Rasa_core_issue

Traceback (most recent call last): File “train_online.py”, line 8, in from rasa_core.agent import Agent File “/usr/local/lib/python3.5/dist-packages/rasa_core/agent.py”, line 17, in from rasa_core.channels import UserMessage, OutputChannel, InputChannel File “/usr/local/lib/python3.5/dist-packages/rasa_core/channels/init.py”, line 17, in from rasa_core.channels.console import CmdlineInput # nopep8 File “/usr/local/lib/python3.5/dist-packages/rasa_core/channels/console.py”, line 2, in import questionary File “/usr/local/lib/python3.5/dist-packages/questionary/init.py”, line 7, in from questionary.prompt import prompt File “/usr/local/lib/python3.5/dist-packages/questionary/prompt.py”, line 8, in from questionary.prompts import AVAILABLE_PROMPTS, prompt_by_name File “/usr/local/lib/python3.5/dist-packages/questionary/prompts/init.py”, line 2, in from questionary.prompts import text File “/usr/local/lib/python3.5/dist-packages/questionary/prompts/text.py”, line 11, in from questionary.prompts.common import build_validator File “/usr/local/lib/python3.5/dist-packages/questionary/prompts/common.py”, line 252, in 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

I think it would help a tiny bit if your post had a minimal amount of formatting. (I never trained online, however, so I don’t think I can help you.)

EDIT : I checked, and it might be that your content is formatted but the output is not. I cannot edit your post, so the editing is done by adding a \ at the end of a line so that the line return is displayed. A bit annoying, but at least it works.

Cheers

I have the similar problem, with the 0.13.0

python3 -m rasa_core.train -d domain.yml -o models/dialogue/ -s data/stories -c config.yaml

Traceback (most recent call last):
  File "/opt/python/Python-3.5.2/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/opt/python/Python-3.5.2/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/opt/python/Python-3.5.2/lib/python3.5/site-packages/rasa_core/train.py", line 6, in <module>
    from rasa_core import config, cli
  File "/opt/python/Python-3.5.2/lib/python3.5/site-packages/rasa_core/config.py", line 6, in <module>
    from rasa_core.policies import PolicyEnsemble
  File "/opt/python/Python-3.5.2/lib/python3.5/site-packages/rasa_core/policies/__init__.py", line 1, in <module>
    from rasa_core.policies.policy import Policy
  File "/opt/python/Python-3.5.2/lib/python3.5/site-packages/rasa_core/policies/policy.py", line 7, in <module>
    from rasa_core.domain import Domain
  File "/opt/python/Python-3.5.2/lib/python3.5/site-packages/rasa_core/domain.py", line 11, in <module>
    from rasa_core.actions import Action, action
  File "/opt/python/Python-3.5.2/lib/python3.5/site-packages/rasa_core/actions/__init__.py", line 1, in <module>
    from rasa_core.actions.action import Action
  File "/opt/python/Python-3.5.2/lib/python3.5/site-packages/rasa_core/actions/action.py", line 9, in <module>
    from rasa_core import events
  File "/opt/python/Python-3.5.2/lib/python3.5/site-packages/rasa_core/events/__init__.py", line 72, in <module>
    class Event(object):
  File "/opt/python/Python-3.5.2/lib/python3.5/site-packages/rasa_core/events/__init__.py", line 93, in Event
    default: Optional[Type['Event']] = None
  File "/opt/python/Python-3.5.2/lib/python3.5/typing.py", line 649, in __getitem__
    return Union[arg, type(None)]
  File "/opt/python/Python-3.5.2/lib/python3.5/typing.py", line 552, in __getitem__
    dict(self.__dict__), parameters, _root=True)
  File "/opt/python/Python-3.5.2/lib/python3.5/typing.py", line 512, in __new__
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
  File "/opt/python/Python-3.5.2/lib/python3.5/typing.py", line 512, in <genexpr>
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
  File "/opt/python/Python-3.5.2/lib/python3.5/typing.py", line 1077, in __subclasscheck__
    if super().__subclasscheck__(cls):
  File "/opt/python/Python-3.5.2/lib/python3.5/abc.py", line 225, in __subclasscheck__
    for scls in cls.__subclasses__():
TypeError: descriptor '__subclasses__' of 'type' object needs an argument

Continuing the discussion from Rasa_core_issue:

python -m rasa_core.train -d domain.yml -s data/stories.md -o models/current/dialogue -c policies.yml --verbose Traceback (most recent call last): File “/usr/lib/python3.5/runpy.py”, line 184, in _run_module_as_main “main”, mod_spec) File “/usr/lib/python3.5/runpy.py”, line 85, in _run_code exec(code, run_globals) File “/usr/local/lib/python3.5/dist-packages/rasa_core/train.py”, line 6, in from rasa_core import config, cli File “/usr/local/lib/python3.5/dist-packages/rasa_core/config.py”, line 6, in from rasa_core.policies import PolicyEnsemble File “/usr/local/lib/python3.5/dist-packages/rasa_core/policies/init.py”, line 1, in from rasa_core.policies.policy import Policy File “/usr/local/lib/python3.5/dist-packages/rasa_core/policies/policy.py”, line 7, in from rasa_core.domain import Domain File “/usr/local/lib/python3.5/dist-packages/rasa_core/domain.py”, line 11, in from rasa_core.actions import Action, action File “/usr/local/lib/python3.5/dist-packages/rasa_core/actions/init.py”, line 1, in from rasa_core.actions.action import Action File “/usr/local/lib/python3.5/dist-packages/rasa_core/actions/action.py”, line 9, in from rasa_core import events File “/usr/local/lib/python3.5/dist-packages/rasa_core/events/init.py”, line 72, in class Event(object): File “/usr/local/lib/python3.5/dist-packages/rasa_core/events/init.py”, line 93, 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

hello, I have the same error, does anyone know how to fix it?

+1 here. Upgraded from 0.12.4 to 0.13.0 and immediately both training and running results in the above stack trace. Migration guide for this path doesn’t seem to mention any of relevance. Did anyone figure out how to fix this? Rasa?

Just to add more details to the above. This seems to be manifesting from the version of python - 3.5.2 which does not support or have a bug with types and annotations. As per this:

Could @Ghostvv or @akelad confirm that this the case? I am running Ubuntu 16.04 and Python 3.5.2 is the highest standard package. It would be hlepful in the upgrade guide for Rasa to state that version 0.13 no longer works on 3.5.2 Currently it says that only python 2 support is dropped.
I installed python 3.6, but it’s non native, so no have to install rasa somehow into python 3.6 environment as I can’t remove python 3.5 from Ubuntu at risk of breaking it. Suggestions? And could you confirm if 0.13.0 is truly not compatible with Ubuntu 16.04 and Python 3.5.2?

Thanks

yes, py3.5.2 has an issue with type annotations, there is a forum thread or GitHub issue somewhere

can you upgrade py3.5 to the latest version?

3.5.2 isn’t supported anymore: Add info that python >= 3.5.3 is required · Issue #3730 · RasaHQ/rasa · GitHub

Thank you @akelad and @Ghostvv. Since I’m running Ubuntu 16.04, I ended up installing virtualenv for python and actvating the virtual en with Python 3.6 in it and then installed Rasa 0.13.x into the virtual env and run it out of virtual env. Was a lot of work as i had to reinstall everything and retrain nlu and core for all the models, but socket.io started to work in that version. Woo hoo. But my slack channels buttons no longer do. :sob:lol. Suggestions? more upgrades to 0.14.x?
In general virtualenv seems to be a nice option for those not running it in the docker.

Yes, in general using a virtual environment is strongly recommended, it’s a lot less error prone. I’m not sure about the status of buttons in 0.13.x, Rasa 1.0 is the most stable version though