question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error while training rasa_core

See original GitHub issue

Rasa Core version: 0.13.3

Python version: 3.6.7

Operating system (windows, osx, …): ubuntu

Issue: Unable to train rasa-core model

$ make train-core python -m rasa_core.train -d domain.yml -s data/stories.md -o models/current/dialogue -c policies.yml Traceback (most recent call last): File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main “main”, fname, loader, pkg_name) File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code exec code in run_globals File “/usr/local/lib/python2.7/dist-packages/rasa_core/train.py”, line 6, in <module> from rasa_core import config, cli File “/usr/local/lib/python2.7/dist-packages/rasa_core/config.py”, line 12 def load(config_file: Optional[Text]) -> List[‘Policy’]: ^ SyntaxError: invalid syntax Makefile:31: recipe for target ‘train-core’ failed make: *** [train-core] Error 1

Content of domain file (if used & relevant): domain.yml file -

intents:
- greet
- goodbye
- thanks
- deny
- joke
- name


entities:
- name


slots:
  name:
    type: text


actions:
- utter_name
- utter_thanks
- utter_greet
- utter_goodbye
- action_joke


templates:
  utter_name:
  - text: "Hey there! Tell me your name."

  utter_greet:
  - text: "Nice to you meet you {name}. How can I help?"

  utter_goodbye:
  - text: "Talk to you later!"

  utter_thanks:
  - text: "My pleasure."

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
kevinthemselfcommented, Mar 20, 2019

@tahamr83 That’s not the issue, the templates are fine, it helps to be more declarative, and my chatbot has used that template since day one without issue.

@mirzahash The issue you’re having is due to using Python 2.7, I’d recommend you reinstall with python3 (3.6 works best) and try that make command again. If you look at the error logs, your Python 2.7 installation is being used instead of your 3.6 since the make commands invoke that version.

What I’ve done to help just prevent that issue from happening in the first place is either alias all python2 commands as python 3 commands in your .bashrc, or just start running the training inside Docker containers, as described here.

Here’s what my .bashrc looks like (this is not ideal and I’d strongly recommend using Docker containers):

alias python=python3.6
alias pip=pip3
0reactions
HarshitaSahaicommented, May 10, 2020

Python 3.6.10 :: Anaconda, Inc. ERROR (python3) C:.….…\medicare_locator>make train-core python3 -m rasa_core.train -d domain.yml -s data/core -o models/current/dialogue -c core_config.yml make: *** [train-core] Error 9009

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while training rasa core - python - Stack Overflow
I am using rasa nlu and rasa core . I am trying out a restaurant example from this github link. I got stuck...
Read more >
ERROR rasa_core.training.online - An exception occurred ...
Does anyone know how to fix this error? I can't even get started with the interactive training as rasa_core barfs with AssertionError :....
Read more >
Building an end-to-end Conversational Assistant with Rasa
Rasa has two main components — Rasa NLU and Rasa Core. ... In the training data, we need to specify what is intent...
Read more >
How to use the rasa.core.channels.channel.UserMessage ...
To help you get started, we've selected a few rasa.core.channels.channel. ... except Exception as e: logger.error("Exception when trying to handle message.
Read more >
Create Chatbot using Rasa Part-1 - Towards Data Science
Rasa Core — This is the place, where Rasa try to help you with contextual message flow. ... Also, you can correct your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found