question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting Error on training : ValueError: dictionary update sequence element #0 has length 1; 2 is required

See original GitHub issue

Rasa 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:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
Stacey940commented, May 4, 2018

Resolved the issue:

interpreter = Interpreter.load(‘./models/nlu/default/myfirstbot’) Thanks for this awesome tutorial.
https://nlu.rasa.com/python.html

0reactions
akeladcommented, Feb 28, 2019

Please create a new issue

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found