TypeError: 'NoneType' object is not iterable


I successfully created a chat bot and connected to to FB messesnger using ngrok. It worked well. Now I tried changing the data and trained the chat bot again. Rasa Nlu trains without any error but when I train rasa core I have the below error: TypeError: ‘NoneType’ object is not iterable

I tested my domain file using yamllint and it worked fine.

Rasa core version : = ‘0.14.5’ python = 3.6 OS = Windows 10

Here’s the traceback : Traceback (most recent call last): File “C:\Users\harit\Anaconda2\envs\botenv\lib\runpy.py”, line 193, in _run_module_as_main “main”, mod_spec) File “C:\Users\harit\Anaconda2\envs\botenv\lib\runpy.py”, line 85, in _run_code exec(code, run_globals) File “C:\Users\harit\Anaconda2\envs\botenv\lib\site-packages\rasa_core\train.py”, line 253, in additional_args) File “C:\Users\harit\Anaconda2\envs\botenv\lib\site-packages\rasa_core\train.py”, line 164, in do_default_training kwargs=additional_arguments) File “C:\Users\harit\Anaconda2\envs\botenv\lib\site-packages\rasa_core\train.py”, line 77, in train policies=policies) File “C:\Users\harit\Anaconda2\envs\botenv\lib\site-packages\rasa_core\agent.py”, line 218, in init self.domain = self._create_domain(domain) File “C:\Users\harit\Anaconda2\envs\botenv\lib\site-packages\rasa_core\agent.py”, line 669, in _create_domain return Domain.load(domain) File “C:\Users\harit\Anaconda2\envs\botenv\lib\site-packages\rasa_core\domain.py”, line 122, in load return cls.from_yaml(read_file(filename)) File “C:\Users\harit\Anaconda2\envs\botenv\lib\site-packages\rasa_core\domain.py”, line 128, in from_yaml return cls.from_dict(data) File “C:\Users\harit\Anaconda2\envs\botenv\lib\site-packages\rasa_core\domain.py”, line 132, in from_dict utter_templates = cls.collect_templates(data.get(“templates”, {})) File “C:\Users\harit\Anaconda2\envs\botenv\lib\site-packages\rasa_core\domain.py”, line 251, in collect_templates for t in template_variations: TypeError: ‘NoneType’ object is not iterable

Please advise on where I went wrong.

I don’t know why this happens but one solution is to call rasa shell like this: rasa shell --cors '*'

Thank you for your answer. I tried it but still get the same error :frowning: