Error while training rasa_core
See original GitHub issueRasa 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:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
@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 themake
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):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