<class 'rasa_nlu.train.TrainingException'>: 'str' object has no attribute 'get'
See original GitHub issueHi,
I’m running RASA NLU
and CORE
as separate processes:
NLU = python -mrasa_nlu.server -c config_spacy.json --path models/nlu/
CORE = python run_rasa_core.py -d models/dialogue/ -u RasaNLUHttpInterpreter
I’ve populated data into a rasaui Agent.
Went to the Training section and hit Start Training
. this makes rasa_nlu throw an exception:
2018-04-26 23:01:45+0300 [-] 2018-04-26 23:01:45 ERROR rasa_nlu.train - Failed to train project 'PROJECT_NAME'.
2018-04-26 23:01:45+0300 [-] Traceback (most recent call last):
2018-04-26 23:01:45+0300 [-] File "/Users/jbar/venv/cubics-bot/lib/python3.6/site-packages/rasa_nlu/train.py", line 114, in do_train_in_worker
2018-04-26 23:01:45+0300 [-] component_builder)
2018-04-26 23:01:45+0300 [-] File "/Users/jbar/venv/cubics-bot/lib/python3.6/site-packages/rasa_nlu/train.py", line 136, in do_train
2018-04-26 23:01:45+0300 [-] trainer = Trainer(cfg, component_builder)
2018-04-26 23:01:45+0300 [-] File "/Users/jbar/venv/cubics-bot/lib/python3.6/site-packages/rasa_nlu/model.py", line 146, in __init__
2018-04-26 23:01:45+0300 [-] components.validate_requirements(cfg.component_names)
2018-04-26 23:01:45+0300 [-] File "/Users/jbar/venv/cubics-bot/lib/python3.6/site-packages/rasa_nlu/config.py", line 146, in component_names
2018-04-26 23:01:45+0300 [-] return [c.get("name") for c in self.pipeline]
2018-04-26 23:01:45+0300 [-] File "/Users/jbar/venv/cubics-bot/lib/python3.6/site-packages/rasa_nlu/config.py", line 146, in <listcomp>
2018-04-26 23:01:45+0300 [-] return [c.get("name") for c in self.pipeline]
2018-04-26 23:01:45+0300 [-] AttributeError: 'str' object has no attribute 'get'
2018-04-26 23:01:45+0300 [-] 2018-04-26 23:01:45 WARNING rasa_nlu.data_router - [Failure instance: Traceback (failure with no frames): <class 'rasa_nlu.train.TrainingException'>: 'str' object has no attribute 'get'
2018-04-26 23:01:45+0300 [-] ]
Rasa-NLU config:
{
"project": "PROJECT_NAME",
"pipeline": [
"nlp_spacy",
"tokenizer_spacy",
"intent_entity_featurizer_regex",
"intent_featurizer_spacy",
"ner_crf",
"ner_synonyms",
"intent_classifier_sklearn",
"ner_spacy"
],
"path": "./models/nlu",
"port": 5000,
"data": "./data/PROJECT_NAME-small.json",
"language": "en",
"log_level": "DEBUG",
"fixed_model_name": "MODEL_NAME_support"
}
Please advise, Yarden
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
'str' object has no attribute 'get' while training rasa
Getting AttributeError: 'str' object has no attribute 'get' while training rasa · Rasa version = 2.3.4 · Operating system = windows 10 ·...
Read more >'str' object has no attribute 'get' - python - Stack Overflow
I am trying to set a field's choices in a modelform by overiding the init but i get this error
Read more >AttributeError: 'str' object has no attribute 'get'
how to solve 'str' object has no attribute 'get' error while trying to execute this code: sns.countplot(x='Survived', data='train').
Read more >attributeerror: 'list' object has no attribute 'detach' - You.com
I want to find attribution of each of the 5 output tensors, that's why I am running the attribution inside a for loop....
Read more >AttributeError: 'str' object has no attribute 'send' : r/learnpython
Im trying to get text from a entry in tkinter and send it to the server but it keeps doing this. AttributeError: 'str'...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, I am using RASA_NLU version: 0.14.0a1
config file:
pipeline:
I am running RASA_NLU server: python -m rasa_nlu.server -c config/config_file.yml --path /models_storing_path/
<class ‘rasa_nlu.train.TrainingException’>: <TrainingException instance at 0x7fa6ea462ee8 with str error: 2018-12-30 10:30:07+0530 [-] Traceback (most recent call last): 2018-12-30 10:30:07+0530 [-] File “/home/anaconda3/lib/python3.6/site-packages/twisted/python/reflect.py”, line 448, in safe_str 2018-12-30 10:30:07+0530 [-] return str(o) 2018-12-30 10:30:07+0530 [-] TypeError: str returned non-string (type int) 2018-12-30 10:30:07+0530 [-] > 2018-12-30 10:30:07+0530 [-] ] 2018-12-30 10:30:07+0530 [-] Unhandled Error Traceback (most recent call last): File “/home/anaconda3/lib/python3.6/site-packages/twisted/internet/defer.py”, line 501, in errback self._startRunCallbacks(fail) File “/home/anaconda3/lib/python3.6/site-packages/twisted/internet/defer.py”, line 568, in _startRunCallbacks self._runCallbacks() File “/home/anaconda3/lib/python3.6/site-packages/twisted/internet/defer.py”, line 654, in _runCallbacks current.result = callback(current.result, *args, **kw) File “/home/anaconda3/lib/python3.6/site-packages/twisted/internet/defer.py”, line 1475, in gotResult _inlineCallbacks(r, g, status) — <exception caught here> — File “/home/anaconda3/lib/python3.6/site-packages/twisted/internet/defer.py”, line 1416, in _inlineCallbacks result = result.throwExceptionIntoGenerator(g) File “/home/anaconda3/lib/python3.6/site-packages/twisted/python/failure.py”, line 491, in throwExceptionIntoGenerator return g.throw(self.type, self.value, self.tb) File “/home/rasa_nlu/rasa_nlu/server.py”, line 360, in train returnValue(json_to_string({“error”: “{}”.format(e)})) builtins.TypeError: str returned non-string (type int)
2018-12-30 10:30:07+0530 [-] “127.0.0.1” - - [30/Dec/2018:05:00:07 +0000] “POST /train?project=tester&model=test HTTP/1.1” 500 3798 “-” “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36” 2018-12-30 10:31:07+0530 [-] Timing out client: IPv4Address(type=‘TCP’, host=‘127.0.0.1’, port=52292)
I dont understand what is the issue “rasa_nlu.train.TrainingException” and –> File “/home/rasa_nlu/rasa_nlu/server.py”, line 360, in train returnValue(json_to_string({“error”: “{}”.format(e)})) builtins.TypeError: str returned non-string (type int)
but when I run docker server it is working and model is built. Can someone help me with this.
I am facing same error, any help on this?