Error while running rasa x command

Hello,

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\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "<home>\appdata\local\continuum\anaconda3\envs\rasaenv\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "<home>\AppData\Local\Continuum\anaconda3\envs\rasaEnv\Scripts\rasa.exe\__main__.py", line 9, in <module>
  File "<home>\appdata\local\continuum\anaconda3\envs\rasaenv\lib\site-packages\rasa\__main__.py", line 70, in main
    cmdline_arguments.func(cmdline_arguments)
  File "<home>\appdata\local\continuum\anaconda3\envs\rasaenv\lib\site-packages\rasa\cli\x.py", line 243, in rasa_x
    local.main(args, project_path, args.data, token=rasa_x_token)
  File "<home>\appdata\local\continuum\anaconda3\envs\rasaenv\lib\site-packages\rasax\community\local.py", line 194, in main
    session)
  File "<home>\appdata\local\continuum\anaconda3\envs\rasaenv\lib\site-packages\rasax\community\local.py", line 144, in _initialize_with_local_data
    LOCAL_PROJECT_NAME,
  File "<home>\appdata\local\continuum\anaconda3\envs\rasaenv\lib\site-packages\rasax\community\api\initialise.py", line 170, in inject_domain
    username=username)
  File "<home>\appdata\local\continuum\anaconda3\envs\rasaenv\lib\site-packages\rasax\community\services\projects_service.py", 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\projects_service.py", 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\projects_service.py", 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 to.md solved the problem. Does it means that stories file needs to be solely.md 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: