Error while running rasa x command


I am trying to migrate my former rasa bot to rasa X. I’ve trained the bot using rasa train successfully and I’ve tested it using rasa shell. Now, when I launch rasa x I get the following error. Could somebody help me understand and fix this error ?

Starting Rasa X in local mode... 🚀
Traceback (most recent call last):
  File "<home>\appdata\local\continuum\anaconda3\envs\rasaenv\lib\", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "<home>\appdata\local\continuum\anaconda3\envs\rasaenv\lib\", line 85, in _run_code
    exec(code, run_globals)
  File "<home>\AppData\Local\Continuum\anaconda3\envs\rasaEnv\Scripts\rasa.exe\", line 9, in <module>
  File "<home>\appdata\local\continuum\anaconda3\envs\rasaenv\lib\site-packages\rasa\", line 70, in main
  File "<home>\appdata\local\continuum\anaconda3\envs\rasaenv\lib\site-packages\rasa\cli\", line 243, in rasa_x
    local.main(args, project_path,, token=rasa_x_token)
  File "<home>\appdata\local\continuum\anaconda3\envs\rasaenv\lib\site-packages\rasax\community\", line 194, in main
  File "<home>\appdata\local\continuum\anaconda3\envs\rasaenv\lib\site-packages\rasax\community\", line 144, in _initialize_with_local_data
  File "<home>\appdata\local\continuum\anaconda3\envs\rasaenv\lib\site-packages\rasax\community\api\", line 170, in inject_domain
  File "<home>\appdata\local\continuum\anaconda3\envs\rasaenv\lib\site-packages\rasax\community\services\", line 48, in store_domain
    templates = _templates(domain, username, project_id)
  File "<home>\appdata\local\continuum\anaconda3\envs\rasaenv\lib\site-packages\rasax\community\services\", line 259, in _templates
    for template, responses in templates.items() for response in responses
  File "<home>\appdata\local\continuum\anaconda3\envs\rasaenv\lib\site-packages\rasax\community\services\", line 259, in <listcomp>
    for template, responses in templates.items() for response in responses
AttributeError: 'str' object has no attribute 'get'

Can you show the templates in your domain? I believe this can be fixed by adding text: to any templates that don’t define the attribute.

Sorry my domain file contains some client sensitive information so I can’t show it. However you were rightI didn’t add text: everywhere. Adding it fixed the problem.

I have another question. I’ve noticed that my stories.yml file was not getting recognised for train. And changing it solved the problem. Does it means that stories file needs to be file now ? Please indicate if I should create a new topic for this question, and I will. Thanks again for your time @erohmensing .

No need for a new topic :slight_smile: stories have always been markdown files – they’re not in yml format. Seems like it was just a weird bug that was allowing your stories.yml to be read before – the way it checks for stories files is by opening and reading the file and checking the format so in that case it probably didn’t matter.

TL;DR yes, stories should be .md files

1 Like

Aaah, got it ! :+1:t5: