Issue: Ordered Dict not of type dict

Hi! I’m getting the following error on rasa train:

C:\Users\rsiddiqui\Anaconda3\envs\newenv\python.exe "F:\Users\rsiddiqui\AppData\Local\JetBrains\PyCharm 2019.3.4\plugins\python\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 54380 --file "C:/Users/rsiddiqui/Documents/Dialogue State Tracking/Annotations/models/RASAModel.py"
pydev debugger: process 2708 is connecting

Connected to pydev debugger (build 193.6911.25)
The configuration for policies was chosen automatically. It was written into the config file at 'C:/Users/rsiddiqui/Documents/Dialogue State Tracking/Annotations/dum/config.yaml'.
Traceback (most recent call last):
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\rasa\shared\utils\validation.py", line 160, in validate_yaml_schema
    c.validate(raise_exception=True)
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\pykwalify\core.py", line 167, in validate
    error_msg=u'.\n - '.join(self.validation_errors)))
pykwalify.errors.SchemaError: <SchemaError: error code 2: Schema validation failed:
 - Value '[ordereddict([('Client Name', ordereddict([('auto_fill', False), ('type', 'categorical'), ('values', ['Direct Express'])]))]), ordereddict([('CSR Name', ordereddict([('auto_fill', False), ('type', 'any')]))]), ordereddict([('Card Status', ordereddict([('auto_fill', False), ('type', 'categorical'), ('values', ['Active'])]))]), ordereddict([('Payee Name', ordereddict([('auto_fill', False), ('type', 'any')]))]), ordereddict([('CH Name', ordereddict([('auto_fill', False), ('type', 'any')]))]), ordereddict([('Last 4 Digits of Card', ordereddict([('auto_fill', False), ('type', 'any')]))]), ordereddict([('Date of Birth', ordereddict([('auto_fill', False), ('type', 'any')]))]), ordereddict([('Last 4 Digits of SSN', ordereddict([('auto_fill', False), ('type', 'any')]))]), ordereddict([('Mobile Phone Number', ordereddict([('auto_fill', False), ('type', 'any')]))]), ordereddict([('Phone Number Type', ordereddict([('auto_fill', False), ('type', 'categorical'), ('values', ['Home Phone Number', 'Mobile Phone Number'])]))]), ordereddict([('Email', ordereddict([('auto_fill', False), ('type', 'any')]))]), ordereddict([('Statement Medium', ordereddict([('auto_fill', False), ('type', 'categorical'), ('values', ['Email'])]))]), ordereddict([('Statement Fees', ordereddict([('auto_fill', False), ('type', 'categorical'), ('values', ['No Money'])]))]), ordereddict([('Statement Frequency', ordereddict([('auto_fill', False), ('type', 'categorical'), ('values', ['Monthly'])]))])]' is not a dict. Value path: '/slots'.
 - Value '[ordereddict([('Auto-Pop Opening_01128c5a-060e-4bf3-8a82-03658ed3e85a', ['Thank you for calling', 'thank you for calling', 'thanks <eps> for calling', 'thank <eps> for calling', 'thanks you for calling'])]), ordereddict([('Auto-Pop Opening_36d90f95-d4fa-4040-ba91-73f13977f6d1', ['Direct Express card services. This is {CSR Name}, How may I help you today?', 'thank you for S. R. services my name is fifty how may I help you', 'thank you for US start services my name is fifteen how may I help you', 'thank you for a R. services my name is Stephanie how may I help you', 'thank you for US start services my name is Stephanie how may I help you'])]), ordereddict([('Welcome Script v1.0_b6113477-a4fe-4847-bc64-bdb218419f67', ['I would first like to take a minute to share some important information', 'we need to go over some additional information with you', 'we need to go over some additional information would do', 'we need to go over some additional information with do'])]), ordereddict([('None', ['Not Found'])])]' is not a dict. Value path: '/responses'.: Path: '/'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\rasa\train.py", line 95, in train_async
    domain = await file_importer.get_domain()
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\rasa\shared\utils\common.py", line 117, in decorated
    return await cache.cached_result()
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\rasa\shared\importers\importer.py", line 441, in get_domain
    self.importer.get_domain(), self._get_domain_with_e2e_actions()
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\rasa\shared\importers\importer.py", line 447, in _get_domain_with_e2e_actions
    stories = await self.get_stories()
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\rasa\shared\importers\importer.py", line 473, in get_stories
    template_variables, use_e2e, exclusion_percentage
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\rasa\shared\importers\importer.py", line 396, in get_stories
    template_variables, use_e2e, exclusion_percentage
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\rasa\shared\utils\common.py", line 117, in decorated
    return await cache.cached_result()
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\rasa\shared\importers\importer.py", line 280, in get_stories
    stories = await asyncio.gather(*stories)
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\rasa\shared\importers\rasa.py", line 51, in get_stories
    await self.get_domain(),
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\rasa\shared\importers\rasa.py", line 67, in get_domain
    domain = Domain.load(self._domain_path)
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\rasa\shared\core\domain.py", line 123, in load
    other = cls.from_path(path)
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\rasa\shared\core\domain.py", line 133, in from_path
    domain = cls.from_file(path)
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\rasa\shared\core\domain.py", line 146, in from_file
    return cls.from_yaml(rasa.shared.utils.io.read_file(path), path)
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\rasa\shared\core\domain.py", line 164, in from_yaml
    raise e
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\rasa\shared\core\domain.py", line 152, in from_yaml
    yaml, rasa.shared.constants.DOMAIN_SCHEMA_FILE
  File "C:\Users\rsiddiqui\Anaconda3\envs\newenv\lib\site-packages\rasa\shared\utils\validation.py", line 167, in validate_yaml_schema
    content=source_data,
rasa.shared.utils.validation.YamlValidationException: Failed to validate 'C:\Users\rsiddiqui\Documents\Dialogue State Tracking\Annotations\domain.yaml'. Please make sure the file is correct and all mandatory parameters are specified. Here are the errors found during validation:
  in C:\Users\rsiddiqui\Documents\Dialogue State Tracking\Annotations\domain.yaml:69:
      Value '[ordereddict([('Client Name', ordereddict([('auto_fill', False), ('type', 'categorical'), ('values', ['Direct Express'])]))]), ordereddict([('CSR Name', ordereddict([('auto_fill', False), ('type', 'any')]))]), ordereddict([('Card Status', ordereddict([('auto_fill', False), ('type', 'categorical'), ('values', ['Active'])]))]), ordereddict([('Payee Name', ordereddict([('auto_fill', False), ('type', 'any')]))]), ordereddict([('CH Name', ordereddict([('auto_fill', False), ('type', 'any')]))]), ordereddict([('Last 4 Digits of Card', ordereddict([('auto_fill', False), ('type', 'any')]))]), ordereddict([('Date of Birth', ordereddict([('auto_fill', False), ('type', 'any')]))]), ordereddict([('Last 4 Digits of SSN', ordereddict([('auto_fill', False), ('type', 'any')]))]), ordereddict([('Mobile Phone Number', ordereddict([('auto_fill', False), ('type', 'any')]))]), ordereddict([('Phone Number Type', ordereddict([('auto_fill', False), ('type', 'categorical'), ('values', ['Home Phone Number', 'Mobile Phone Number'])]))]), ordereddict([('Email', ordereddict([('auto_fill', False), ('type', 'any')]))]), ordereddict([('Statement Medium', ordereddict([('auto_fill', False), ('type', 'categorical'), ('values', ['Email'])]))]), ordereddict([('Statement Fees', ordereddict([('auto_fill', False), ('type', 'categorical'), ('values', ['No Money'])]))]), ordereddict([('Statement Frequency', ordereddict([('auto_fill', False), ('type', 'categorical'), ('values', ['Monthly'])]))])]' is not a dict. Value path: '/slots'
  in C:\Users\rsiddiqui\Documents\Dialogue State Tracking\Annotations\domain.yaml:125:
      Value '[ordereddict([('Auto-Pop Opening_01128c5a-060e-4bf3-8a82-03658ed3e85a', ['Thank you for calling', 'thank you for calling', 'thanks <eps> for calling', 'thank <eps> for calling', 'thanks you for calling'])]), ordereddict([('Auto-Pop Opening_36d90f95-d4fa-4040-ba91-73f13977f6d1', ['Direct Express card services. This is {CSR Name}, How may I help you today?', 'thank you for S. R. services my name is fifty how may I help you', 'thank you for US start services my name is fifteen how may I help you', 'thank you for a R. services my name is Stephanie how may I help you', 'thank you for US start services my name is Stephanie how may I help you'])]), ordereddict([('Welcome Script v1.0_b6113477-a4fe-4847-bc64-bdb218419f67', ['I would first like to take a minute to share some important information', 'we need to go over some additional information with you', 'we need to go over some additional information would do', 'we need to go over some additional information with do'])]), ordereddict([('None', ['Not Found'])])]' is not a dict. Value path: '/responses'

I am self generating the training file from the database, and in order to match the same format as in RASA Documentation samples, I used OrderedDict - but its not getting recognized as dict I guess. Visually the .yaml files are exactly the same as rasa docs, but inside I need to use OrderedDicts for consistancy. Is there another way to do this?

Based on the error message, it looks like you are not conforming to the yaml spec. You can use the rasa validate command to validate your format before running train.

You can see an example of the domain format here