Rasa-core training error

Hi, I am starting with the starter-kit and installed all components and training the rasa-nlu and rasa-core. Rasa-nlu trained fine.

Rasa-core training throws error. Not sure what is the reason.

Please advise. Thanks

Here is the error stack -

ubuntu@ip-172-31-43-72:~/RP/starter-pack-rasa-stack$ make train-core python3 -m rasa_core.train -d domain.yml -s data/stories.md -o models/current/dialogue -c policies.yml Error processing line 1 of /home/ubuntu/.local/lib/python3.5/site-packages/matplotlib-2.2.4-py3.5-nspkg.pth:

Traceback (most recent call last): File “/usr/lib/python3.5/site.py”, line 173, in addpackage exec(line) File “”, line 1, in File “”, line 574, in module_from_spec AttributeError: ‘NoneType’ object has no attribute ‘loader’

Remainder of file ignored Traceback (most recent call last): File “/usr/lib/python3.5/runpy.py”, line 174, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File “/usr/lib/python3.5/runpy.py”, line 109, in _get_module_details import(pkg_name) File “/home/ubuntu/.local/lib/python3.5/site-packages/rasa_core/init.py”, line 5, in from rasa_core.train import train File “/home/ubuntu/.local/lib/python3.5/site-packages/rasa_core/train.py”, line 11, in from rasa_core.domain import TemplateDomain File “/home/ubuntu/.local/lib/python3.5/site-packages/rasa_core/domain.py”, line 12, in from rasa_core.actions import Action, action File “/home/ubuntu/.local/lib/python3.5/site-packages/rasa_core/actions/init.py”, line 1, in from rasa_core.actions.action import Action File “/home/ubuntu/.local/lib/python3.5/site-packages/rasa_core/actions/action.py”, line 9, in from rasa_core import events File “/home/ubuntu/.local/lib/python3.5/site-packages/rasa_core/events/init.py”, line 73, in class Event(object): File “/home/ubuntu/.local/lib/python3.5/site-packages/rasa_core/events/init.py”, line 94, in Event default: Optional[Type[‘Event’]] = None File “/usr/lib/python3.5/typing.py”, line 649, in getitem return Union[arg, type(None)] File “/usr/lib/python3.5/typing.py”, line 552, in getitem dict(self.dict), parameters, _root=True) File “/usr/lib/python3.5/typing.py”, line 512, in new for t2 in all_params - {t1} if not isinstance(t2, TypeVar)): File “/usr/lib/python3.5/typing.py”, line 512, in for t2 in all_params - {t1} if not isinstance(t2, TypeVar)): File “/usr/lib/python3.5/typing.py”, line 1077, in subclasscheck if super().subclasscheck(cls): File “/usr/lib/python3.5/abc.py”, line 225, in subclasscheck for scls in cls.subclasses(): TypeError: descriptor ‘subclasses’ of ‘type’ object needs an argument Makefile:31: recipe for target ‘train-core’ failed make: *** [train-core] Error 1

Any reason why using python3.5? Although it should work anyway. It seems there is an error with this “site.py” file in your python 3.5 library from what I remember Rasa doesn’t have a “site.py” file in its code. Can you try using python 3.6?

Try the following:

pip3.6 install -r requirements.txt
python3.6 -m spacy download en

Change the Makefile inside the starter-pack-rasa so it stays this way:

train-nlu:
python3.6 -m rasa_nlu.train -c nlu_config.yml --data data/nlu_data.md -o models --fixed_model_name nlu --project current --verbose

train-core:
python3.6 -m rasa_core.train -d domain.yml -s data/stories.md -o models/current/dialogue -c policies.yml

cmdline:
python3.6 -m rasa_core.run -d models/current/dialogue -u models/current/nlu --endpoints endpoints.yml

action-server:
python3.6 -m rasa_core_sdk.endpoint --actions actions

Regards,

Thanks for the suggestion. Since you mentioned it should work with 3.5 kept it as is for now.

I fixed the loader issue with current 3.5 version and getting a new error…

python3 -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/python3.5/runpy.py”, line 174, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File “/usr/lib/python3.5/runpy.py”, line 109, in _get_module_details import(pkg_name) File “/home/ubuntu/.local/lib/python3.5/site-packages/rasa_core/init.py”, line 5, in from rasa_core.train import train File “/home/ubuntu/.local/lib/python3.5/site-packages/rasa_core/train.py”, line 11, in from rasa_core.domain import TemplateDomain File “/home/ubuntu/.local/lib/python3.5/site-packages/rasa_core/domain.py”, line 12, in from rasa_core.actions import Action, action File “/home/ubuntu/.local/lib/python3.5/site-packages/rasa_core/actions/init.py”, line 1, in from rasa_core.actions.action import Action File “/home/ubuntu/.local/lib/python3.5/site-packages/rasa_core/actions/action.py”, line 9, in from rasa_core import events File “/home/ubuntu/.local/lib/python3.5/site-packages/rasa_core/events/init.py”, line 73, in class Event(object): File “/home/ubuntu/.local/lib/python3.5/site-packages/rasa_core/events/init.py”, line 94, in Event default: Optional[Type[‘Event’]] = None File “/usr/lib/python3.5/typing.py”, line 649, in getitem return Union[arg, type(None)] File “/usr/lib/python3.5/typing.py”, line 552, in getitem dict(self.dict), parameters, _root=True) File “/usr/lib/python3.5/typing.py”, line 512, in new for t2 in all_params - {t1} if not isinstance(t2, TypeVar)): File “/usr/lib/python3.5/typing.py”, line 512, in for t2 in all_params - {t1} if not isinstance(t2, TypeVar)): File “/usr/lib/python3.5/typing.py”, line 1077, in subclasscheck if super().subclasscheck(cls): File “/usr/lib/python3.5/abc.py”, line 225, in subclasscheck for scls in cls.subclasses(): TypeError: descriptor ‘subclasses’ of ‘type’ object needs an argument Makefile:31: recipe for target ‘train-core’ failed make: *** [train-core] Error 1

Which version of python 3.5 are you running?

I think this error is a bug from python 3.5.2 you need at least python 3.5.3

I installed 3.6 and everything worked like a charm. Thanks for the help.