Rasa: “No project found with name ‘default’.”

Created on 17 Sep 2018  ·  14Comments  ·  Source: RasaHQ/rasa

Rasa NLU version:
rasa-core==0.11.3
rasa-core-sdk==0.11.3
rasa-nlu==0.13.3

Operating system (windows, osx, ...):
OSX
Content of model configuration file:

pipeline:
- name: "nlp_spacy"
- name: "tokenizer_whitespace"
- name: "ner_crf"
- name: "ner_synonyms"
- name: "intent_featurizer_count_vectors"
- name: "intent_classifier_tensorflow_embedding"
  intent_tokenization_flag: true
  intent_split_symbol: "+"

Can't load the model in rasa_nlu.server, it throws following error.
Issue:

{
    "error": "No project found with name 'default'."
}

model trained with

python -m rasa_nlu.train -c config.yml --fixed_model_name mecosProviderModel --project current --path models/mecosProvider/ --data data/mecos_provider_training.json

Tried to load the model with different configurations:

python -m rasa_nlu.server -c config.yml --path models/mecosProvider/ --pre_load mecosProviderModel --debug
python -m rasa_nlu.server -c config.yml --path models/ --pre_load current --debug
python -m rasa_nlu.server -c config.yml --path models/ --pre_load current/mecosProviderModel --debug

but still got the same problem after even adding the model and project in post request

curl -XPOST localhost:5000/parse -d '{"q":"open settings", "project":"mecosProvider", "model":"mecosProviderModel"}'

got following error

{
    "error": "Unable to initialize persistor"
}

and log says:

2018-09-17 09:54:57 INFO     rasa_nlu.data_router  - Logging of requests is disabled. (No 'request_log' directory configured)
2018-09-17 09:54:57+0500 [-] Log opened.
2018-09-17 09:54:57 INFO     __main__  - Started http server on port 5000
2018-09-17 09:54:57+0500 [-] Site starting on 5000
2018-09-17 09:54:57+0500 [-] Starting factory <twisted.web.server.Site object at 0x1157c7208>
2018-09-17 09:54:57+0500 [-] 2018-09-17 09:54:57 WARNING  rasa_nlu.project  - Invalid model requested. Using default
2018-09-17 09:55:06+0500 [-] 2018-09-17 09:55:06 WARNING  rasa_nlu.project  - Using default interpreter, couldn't fetch model: Unable to initialize persistor
2018-09-17 09:55:06+0500 [-] 2018-09-17 09:55:06 ERROR    __main__  - Unable to initialize persistor
2018-09-17 09:55:06+0500 [-] Traceback (most recent call last):
2018-09-17 09:55:06+0500 [-]   File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rasa_nlu/server.py", line 245, in parse
2018-09-17 09:55:06+0500 [-]     self.data_router.parse, data))
2018-09-17 09:55:06+0500 [-]   File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/twisted/python/threadpool.py", line 250, in inContext
2018-09-17 09:55:06+0500 [-]     result = inContext.theWork()
2018-09-17 09:55:06+0500 [-]   File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/twisted/python/threadpool.py", line 266, in <lambda>
2018-09-17 09:55:06+0500 [-]     inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
2018-09-17 09:55:06+0500 [-]   File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/twisted/python/context.py", line 122, in callWithContext
2018-09-17 09:55:06+0500 [-]     return self.currentContext().callWithContext(ctx, func, *args, **kw)
2018-09-17 09:55:06+0500 [-]   File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/twisted/python/context.py", line 85, in callWithContext
2018-09-17 09:55:06+0500 [-]     return func(*args,**kw)
2018-09-17 09:55:06+0500 [-]   File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rasa_nlu/data_router.py", line 264, in parse
2018-09-17 09:55:06+0500 [-]     model)
2018-09-17 09:55:06+0500 [-]   File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rasa_nlu/project.py", line 250, in parse
2018-09-17 09:55:06+0500 [-]     interpreter = self._interpreter_for_model(model_name)
2018-09-17 09:55:06+0500 [-]   File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rasa_nlu/project.py", line 355, in _interpreter_for_model
2018-09-17 09:55:06+0500 [-]     metadata = self._read_model_metadata(model_name, model_dir)
2018-09-17 09:55:06+0500 [-]   File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rasa_nlu/project.py", line 372, in _read_model_metadata
2018-09-17 09:55:06+0500 [-]     self._load_model_from_cloud(model_name, path)
2018-09-17 09:55:06+0500 [-]   File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rasa_nlu/project.py", line 411, in _load_model_from_cloud
2018-09-17 09:55:06+0500 [-]     raise RuntimeError("Unable to initialize persistor")
2018-09-17 09:55:06+0500 [-] RuntimeError: Unable to initialize persistor
2018-09-17 09:55:06+0500 [-] "127.0.0.1" - - [17/Sep/2018:04:55:05 +0000] "POST /parse HTTP/1.1" 500 47 "-" "PostmanRuntime/7.3.0"
2018-09-17 09:56:06+0500 [-] Timing out client: IPv4Address(type='TCP', host='127.0.0.1', port=49846)

Most helpful comment

okay I got the issue.
use only models directory and store models/current or whatever name is. Do not use models/nlu/current.

All 14 comments

Thanks for raising this issue, @amn41 will get back to you about it soon.

@mirfan899 can you confirm the path where your model is stored?

what about if you pass the project and model names as query params?

curl -XPOST 'localhost:5000/parse?project=mecosProvider&model=mecosProviderModel' -d '{"q":"open settings"}'

@amn41 following command thows error

curl -XPOST 'localhost:5000/parse?project=mecosProvider&model=mecosProviderModel' -d '{"q":"open settings"}'

error

{
  "error": "No project found with name 'default'."
}

when rasa_nlu.server is run by

python -m rasa_nlu.server --path models/

Path is:

/Users/mirfan/PycharmProjects/mecosProviderMedication/models/mecosProvider/current/mecosProviderModel

Tried many combinations of creating the model such as

python -m rasa_nlu.train -c config.yml --fixed_model_name mecosProviderModel --project current --path models/mecosProvider --data data/mecos_provider_training.json
python -m rasa_nlu.train -c config.yml --fixed_model_name mecosProviderModel --project mecosProvider --path models/mecosProvider --data data/mecos_provider_training.json
python -m rasa_nlu.train -c config.yml --fixed_model_name mecosProviderModel --project default --path models/mecosProvider --data data/mecos_provider_training.json
python -m rasa_nlu.train -c config.yml --fixed_model_name mecosProviderModel --project current --path models/--data data/mecos_provider_training.json

But only --project default works. Naming project with other names such as mecosProvider and current does not work at all.

What I have found so far is rasa_nlu.server does not read the nested directories in my case
screen shot 2018-09-17 at 3 03 33 pm
current and default are being used without errors but mecosProvider project throws error.

yes that is correct, rasa nlu won't traverse nested directories, so all of your projects should sit under the /models directory.

@mirfan899 did you fix it ? i tried alot and still cant send requests via http

@Noarah do not use nested directory for model.

@mirfan899 thanks for reply I will explain more
The model stores in /home/noarah/rasa-demo/models/nlu/current

my path server is python -m rasa_nlu.server --path /home/noarah/rasa-demo/models/

I query with curl -XPOST 'localhost:5000/parse?project=nlu&model=current' -d '{"q":"hey"}'
{
give me error
"error": "No project found with name 'default'."
screenshot from 2018-10-18 01-27-54

rasa-core 0.11.1
rasa-nlu 0.13.1

okay I got the issue.
use only models directory and store models/current or whatever name is. Do not use models/nlu/current.

did it work for you even i have the same issue

yes

did it work for you even i have the same issue

You have to specify both the project and model names.
E.g., curl "10.47.221.181:5000/parse?q=hello&project=demo&model=nlu_model"

I fix it use "python -m rasa_nlu.server --path models/" to start nlu server

Was this page helpful?
0 / 5 - 0 ratings