ImportError: cannot import name 'MESSAGE_RESPONSE_KEY_ATTRIBUTE' from 'rasa.nlu.constants'

Hi, After I upgraded Rasa to 1.6, I’m no longer able to run rasa x.

This is the error I get:

(base) C:\Users\TizianoLabruna\Documents\Rasa\testBot>rasa x
2019-12-19 11:06:24.896239: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
Traceback (most recent call last):
  File "c:\users\tizianolabruna\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\tizianolabruna\anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\TizianoLabruna\Anaconda3\Scripts\rasa.exe\__main__.py", line 9, in <module>
  File "c:\users\tizianolabruna\anaconda3\lib\site-packages\rasa\__main__.py", line 76, in main
    cmdline_arguments.func(cmdline_arguments)
  File "c:\users\tizianolabruna\anaconda3\lib\site-packages\rasa\cli\x.py", line 324, in rasa_x
    run_locally(args)
  File "c:\users\tizianolabruna\anaconda3\lib\site-packages\rasa\cli\x.py", line 412, in run_locally
    from rasax.community import local  # pytype: disable=import-error
  File "c:\users\tizianolabruna\anaconda3\lib\site-packages\rasax\community\local.py", line 18, in <module>
    from rasax.community import config, metrics, sql_migrations
  File "c:\users\tizianolabruna\anaconda3\lib\site-packages\rasax\community\sql_migrations.py", line 14, in <module>
    from rasax.community.services.settings_service import SettingsService
  File "c:\users\tizianolabruna\anaconda3\lib\site-packages\rasax\community\services\settings_service.py", line 18, in <module>
    from rasax.community.services.data_service import DataService
  File "c:\users\tizianolabruna\anaconda3\lib\site-packages\rasax\community\services\data_service.py", line 16, in <module>
    from rasa.nlu.constants import MESSAGE_RESPONSE_KEY_ATTRIBUTE, MESSAGE_INTENT_ATTRIBUTE
ImportError: cannot import name 'MESSAGE_RESPONSE_KEY_ATTRIBUTE' from 'rasa.nlu.constants' (c:\users\tizianolabruna\anaconda3\lib\site-packages\rasa\nlu\constants.py)

Hi @tiziano, the most recent rasa release isn’t compatible with the latest rasa x yet. Rasa X has a pinned rasa requirement – you should have gotten a warning about that upon upgrade. A compatible rasa x release should be out soon! In the meantime, probably best if you re-install the necessary rasa x requirements (inc rasa 1.5.x) to keep using rasa x:

pip install rasa-x==0.23.5 --extra-index-url https://pypi.rasa.com/simple

Alright, thank you!

ps Can you please have a look to my other problem which is making me struggling for the last 8 days? :frowning: Thank you!

Sorry about that, apparently the latest rasa x (0.23.5) should be compatible with 1.6! perhaps your rasa x was still on 0.23.4 which led it not to work.

Just in case you want to try out the new features :slight_smile: