Getting Error on training : ValueError: dictionary update sequence element #0 has length 1; 2 is required
See original GitHub issueRasa NLU version: 0.1.2
Operating system (windows, osx, …): Windows 10
Content of model configuration file:
{
"pipeline": "spacy_sklearn",
"path":"./models/nlu",
"data":"./data/data.json"
}
Training python file train_model.py:
from rasa_nlu.training_data import load_data
from rasa_nlu.config import RasaNLUModelConfig
from rasa_nlu.model import Trainer
from rasa_nlu.model import Metadata, Interpreter
def train_nlu(data, config, model_dir):
training_data = load_data(data)
trainer = Trainer(RasaNLUModelConfig(config))
trainer.train(training_data)
model_directory = trainer.persist(model_dir, fixed_model_name = 'myapps')
if __name__ == '__main__':
train_nlu('data/data.json', 'config_spacy.json', './models/nlu')
Issue: Getting Below error . Unable to fix what
File "nlu_model.py", line 17, in <module>
train_nlu('data/data.json', 'config_spacy.json', './models/nlu')
File "nlu_model.py", line 8, in train_nlu
trainer = Trainer(RasaNLUModelConfig(config))
File "C:\Users\stacy\AppData\Local\Programs\Python\Python36-32\lib\site-packages\rasa_nlu\config.py", line 79, in __init__
self.override(configuration_values)
File "C:\Users\stacy\AppData\Local\Programs\Python\Python36-32\lib\site-packages\rasa_nlu\config.py", line 160, in override
self.__dict__.update(config)
ValueError: dictionary update sequence element #0 has length 1; 2 is required
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Error: "dictionary update sequence element #0 has length 1; 2 ...
I got this error when I was messing around with string and dictionary. ... If you give the sequence and any element length...
Read more >dictionary update sequence element #0 has length 1; 2 is ...
When trying to run the command trainer.fit(tft, train_dataloaders = train_dataloader, val_dataloaders = val_dataloader,) the following error ...
Read more >dictionary update sequence element #0 has length 5; 2 is ...
ValueError : dictionary update sequence element # 0 has length 5; 2 is required d = {} d.update({1: 1, 2 :2}) … Show...
Read more >ValueError: dictionary update sequence element #0 has length 1
The error is saying that G.add_edges_from is expecting to be passed an iterable that has each item being an iterable of 2.
Read more >Resolve the Error ValueError: dictionary update sequence ...
Getting Error on training : ValueError: dictionary update sequence element #0 has length 1; 2 is required #1066.
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 Free
Top 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
Resolved the issue:
interpreter = Interpreter.load(‘./models/nlu/default/myfirstbot’) Thanks for this awesome tutorial.
https://nlu.rasa.com/python.html
Please create a new issue