RasaHQ / rasa-nlu-examples

This repository contains examples of custom components for educational purposes.
https://RasaHQ.github.io/rasa-nlu-examples/
Apache License 2.0
189 stars 77 forks source link

RASA NLU getting this error 'str' object has no attribute 'get' #150

Closed abhijeetdas057 closed 2 years ago

abhijeetdas057 commented 2 years ago

Error while running the train command:

File "C:\Users\abhijeet.das5\AppData\Local\Continuum\anaconda3\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Users\abhijeet.das5\AppData\Local\Continuum\anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\abhijeet.das5\OneDrive - EY\Documents\NER_RASA_Trainer\rasaenv\lib\site-packages\rasa_nlu\train.py", line 184, in num_threads=cmdline_args.num_threads) File "C:\Users\abhijeet.das5\OneDrive - EY\Documents\NER_RASA_Trainer\rasaenv\lib\site-packages\rasa_nlu\train.py", line 148, in do_train trainer = Trainer(cfg, component_builder) File "C:\Users\abhijeet.das5\OneDrive - EY\Documents\NER_RASA_Trainer\rasaenv\lib\site-packages\rasa_nlu\model.py", line 152, in init components.validate_requirements(cfg.component_names) File "C:\Users\abhijeet.das5\OneDrive - EY\Documents\NER_RASA_Trainer\rasaenv\lib\site-packages\rasa_nlu\config.py", line 182, in component_names return [c.get("name") for c in self.pipeline] File "C:\Users\abhijeet.das5\OneDrive - EY\Documents\NER_RASA_Trainer\rasaenv\lib\site-packages\rasa_nlu\config.py", line 182, in return [c.get("name") for c in self.pipeline] AttributeError: 'str' object has no attribute 'get'

config_spacy.json

{ "pipeline": [ "nlp_spacy", "tokenizer_spacy", "intent_featurizer_spacy", "intent_entity_featurizer_regex", "ner_crf", "ner_synonyms", "intent_classifier_sklearn" ], "port": 7050, "cors_origins":["*"], "path" : "./projects", "data" : "./data/examples/rasa/testData.json" }

Command used to train the model:

python -m rasa_nlu.train -c config_spacy.json --data ./data/examples/rasa/testData.json --path ./projects

koaning commented 2 years ago

This project, at the moment, only supports Rasa 2.x. The python -m rasa_nlu.train bit of your code as well as your config_space.json file suggests you're using Rasa 0.x. Soon this project will only start supporting Rasa 3.x.

Hence, I'll close the issue for now. If you believe I've made a mistake, feel free to re-open.