# Resolve the Error ValueError: dictionary update sequence element #0 has length 1; 2 is required

**URL:** <https://forum.rasa.com/t/resolve-the-error-valueerror-dictionary-update-sequence-element-0-has-length-1-2-is-required/24371>\
**Category:** Rasa Open Source\
**Created:** [February 5, 2020, 9:30am UTC](https://forum.rasa.com/t/resolve-the-error-valueerror-dictionary-update-sequence-element-0-has-length-1-2-is-required/24371 "2020-02-05T09:30:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikamsau](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@nikamsau](https://forum.rasa.com/u/nikamsau)\
**Post date:** [February 5, 2020, 9:30am UTC](https://forum.rasa.com/t/resolve-the-error-valueerror-dictionary-update-sequence-element-0-has-length-1-2-is-required/24371/1 "2020-02-05T09:30:42Z")

</div>

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

**configuration file:** { “pipeline”:“spacy\_sklearn”, “path”:"./models/nlu", “data”:"./data/data.json" }

**nlu\_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 from rasa\_nlu import config

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 = ‘weathernlu’)

def run\_nlu(): interpreter = Interpreter.load(’./models/nlu/default/weathernlu’, RasaNLUConfig(‘config\_spacy.json’)) print(interpreter.parse(“I am planning my holiday to Lithuania. I wonder what is the weather out there.”))

if **name** == ‘ **main** ’: train\_nlu(’./data/data.json’, ‘config\_spacy.json’, ‘./models/nlu’) #run\_nlu()

**Error:Traceback (most recent call last):** File “nlu\_model.py”, line 18, in train\_nlu(’./data/data.json’, ‘config\_spacy.json’, ‘./models/nlu’) File “nlu\_model.py”, line 9, in train\_nlu trainer = Trainer(RasaNLUModelConfig(config)) File “C:\anaconda3\lib\site-packages\rasa\_nlu\config.py”, line 95, in **init** self.override(configuration\_values) File “C:\anaconda3\lib\site-packages\rasa\_nlu\config.py”, line 186, in override self. **dict**.update(config) ValueError: dictionary update sequence element #0 has length 1; 2 is required

How to resolve this error??

---

<div class="post-metadata">

**Author:** ![Juste](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/juste/32/15_2.png) [@Juste](https://forum.rasa.com/u/Juste)\
**Post date:** [February 6, 2020, 9:39am UTC](https://forum.rasa.com/t/resolve-the-error-valueerror-dictionary-update-sequence-element-0-has-length-1-2-is-required/24371/2 "2020-02-06T09:39:17Z")

</div>

Hey @nikamsau. I can see you are using my old weatherbot example. So great to see that! 🙂

I am pretty sure the example needs to be updated for the latest version of Rasa. I’ll do that later today, but in a meantime I would suggest you checking out the [tutorial](https://rasa.com/docs/rasa/user-guide/rasa-tutorial/) on Rasa documentation for a step-by-step intro to Rasa.

---

<div class="post-metadata">

**Author:** ![nikamsau](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@nikamsau](https://forum.rasa.com/u/nikamsau)\
**Post date:** [February 6, 2020, 10:02am UTC](https://forum.rasa.com/t/resolve-the-error-valueerror-dictionary-update-sequence-element-0-has-length-1-2-is-required/24371/3 "2020-02-06T10:02:33Z")

</div>

Thanks @Juste for the response. I will surely go through the tutorial. But kindly provide the updated example, so that I can progress easily. Thanks!!

---

<div class="post-metadata">

**Author:** ![Rishi174](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@Rishi174](https://forum.rasa.com/u/Rishi174)\
**Post date:** [March 24, 2020, 1:22pm UTC](https://forum.rasa.com/t/resolve-the-error-valueerror-dictionary-update-sequence-element-0-has-length-1-2-is-required/24371/4 "2020-03-24T13:22:22Z")

</div>

@Juste… Can you please confirm if you have changed the code for the weatherbot example
