Rasa x failed to start due to exception mentioned below

conda list rasa

Name Version Build Channel

rasa 2.8.0 pypi_0 pypi rasa-sdk 2.8.1 pypi_0 pypi rasa-x 0.41.2 pypi_0 pypi

(rasa_test_1)D:\BOT_POC>rasa x Starting Rasa X in local mode… :rocket: Traceback (most recent call last): File “d:\bot_poc\lib\site-packages\rasa\cli\x.py”, line 496, in run_locally local.main( File “d:\bot_poc\lib\site-packages\rasax\community\local.py”, line 234, in main sql_migrations.run_migrations(session) File “d:\bot_poc\lib\site-packages\rasax\community\sql_migrations.py”, line 25, in run_migrations _run_schema_migrations(session) File “d:\bot_poc\lib\site-packages\rasax\community\sql_migrations.py”, line 41, in _run_schema_migrations _run_alembic_migration(alembic_config) File “d:\bot_poc\lib\site-packages\rasax\community\sql_migrations.py”, line 65, in _run_alembic_migration command.upgrade(alembic_config, target_revision) File “d:\bot_poc\lib\site-packages\alembic\command.py”, line 298, in upgrade script.run_env() File “d:\bot_poc\lib\site-packages\alembic\script\base.py”, line 489, in run_env util.load_python_file(self.dir, “env.py”) File “d:\bot_poc\lib\site-packages\alembic\util\pyfiles.py”, line 98, in load_python_file module = load_module_py(module_id, path) File “d:\bot_poc\lib\site-packages\alembic\util\compat.py”, line 184, in load_module_py spec.loader.exec_module(module) File “”, line 783, in exec_module File “”, line 219, in _call_with_frames_removed File “d:\bot_poc\lib\site-packages\rasax\community\database\schema_migrations\alembic\env.py”, line 96, in run_migrations_online() File “d:\bot_poc\lib\site-packages\rasax\community\database\schema_migrations\alembic\env.py”, line 86, in run_migrations_online context.run_migrations() File “”, line 8, in run_migrations File “d:\bot_poc\lib\site-packages\alembic\runtime\environment.py”, line 846, in run_migrations self.get_context().run_migrations(**kw) File “d:\bot_poc\lib\site-packages\alembic\runtime\migration.py”, line 511, in run_migrations for step in self._migrations_fn(heads, self): File “d:\bot_poc\lib\site-packages\alembic\command.py”, line 287, in upgrade return script._upgrade_revs(revision, rev) File “d:\bot_poc\lib\site-packages\alembic\script\base.py”, line 364, in _upgrade_revs revs = list(revs) File “d:\bot_poc\lib\site-packages\alembic\script\revision.py”, line 777, in _iterate_revisions uppers = util.dedupe_tuple(self.get_revisions(upper)) File “d:\bot_poc\lib\site-packages\alembic\script\revision.py”, line 321, in get_revisions resolved_id, branch_label = self.resolve_revision_number(id) File “d:\bot_poc\lib\site-packages\alembic\script\revision.py”, line 501, in _resolve_revision_number self._revision_map File “d:\bot_poc\lib\site-packages\alembic\util\langhelpers.py”, line 230, in get obj.dict[self.name] = result = self.fget(obj) File “d:\bot_poc\lib\site-packages\alembic\script\revision.py”, line 123, in _revision_map for revision in self._generator(): File “d:\bot_poc\lib\site-packages\alembic\script\base.py”, line 112, in _load_revisions script = Script.from_filename(self, vers, file) File “d:\bot_poc\lib\site-packages\alembic\script\base.py”, line 906, in from_filename module = util.load_python_file(dir, filename) File “d:\bot_poc\lib\site-packages\alembic\util\pyfiles.py”, line 98, in load_python_file module = load_module_py(module_id, path) File “d:\bot_poc\lib\site-packages\alembic\util\compat.py”, line 184, in load_module_py spec.loader.exec_module(module) File “”, line 783, in exec_module File “”, line 219, in call_with_frames_removed File “d:\bot_poc\lib\site-packages\rasax\community\database\schema_migrations\alembic\versions\migration_2019_06_03_initial_migration_2a216ed121dd.py”, line 14, in import rasax.community.database.schema_migrations.alembic.utils as migration_utils File “d:\bot_poc\lib\site-packages\rasax\community\database\schema_migrations\alembic\utils.py”, line 12, in from sqlalchemy.engine import reflection, RowProxy, Connection ImportError: cannot import name ‘RowProxy’ from ‘sqlalchemy.engine’ (d:\bot_poc\lib\site-packages\sqlalchemy\engine_init.py)

Sorry, something went wrong (see error above). Make sure to start Rasa X with valid data and valid domain and config files. Please, also check any warnings that popped up. If you need help fixing the issue visit our forum: http://forum.rasa.com/. Goodbye :wave:

(rasa_test_1)D:\BOT_POC>conda list alembic

packages in environment at D:\BOT_POC:

Name Version Build Channel

alembic 1.4.3 pypi_0 pypi

(rasa_test_1)D:\BOT_POC>conda list SQLAlchemy

packages in environment at D:\BOT_POC:

Name Version Build Channel

sqlalchemy 1.4.21 pypi_0 pypi

(rasa_test_1)D:\BOT_POC>

@sharifm How you installed rasa and rasa-sdk whilst using conda or pip?

================================================================================== Below installation went well

conda create --prefix D:\bot_poc1 python=3.8.8 conda install ujson conda install tensorflow pip install rasa

================================================================================== However while installing rasa-x , it was taking too much time with 1st command w/ multiple version(s) installation for same library, So aborted the process below command

pip install rasa-x -i https://pypi.rasa.com/simple


Downloading sniffio-1.1.0-py3-none-any.whl (4.5 kB) INFO: pip is looking at multiple versions of aiofiles to determine which version is compatible with other requirements. This could take a while. Downloading sniffio-1.0.0-py3-none-any.whl (4.4 kB) INFO: pip is looking at multiple versions of httpcore to determine which version is compatible with other requirements. This could take a while. Collecting httpcore==0.11.* Using cached httpcore-0.11.1-py3-none-any.whl (52 kB) INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking INFO: pip is looking at multiple versions of sniffio to determine which version is compatible with other requirements. This could take a while. Downloading httpcore-0.11.0-py3-none-any.whl (52 kB) |████████████████████████████████| 52 kB 424 kB/s

================================================================================== So did CNTRL+C and re-run the installation w/ below {modified} command

================================================================================== pip install rasa-x -i https://pypi.rasa.com/simple --use-deprecated=legacy-resolver


Requirement already satisfied: requests-oauthlib>=0.7.0 in d:\d:\bot_poc\lib\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow<2.4,>=2.3->rasa) (1.3.0) Requirement already satisfied: oauthlib>=3.0.0 in d:\d:\bot_poc\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow<2.4,>=2.3->rasa) (3.1.1) Installing collected packages: croniter, smmap, gitdb, GitPython, isodate, python-editor, Mako, alembic, pika, rasa-x, packaging, prompt-toolkit Attempting uninstall: packaging Found existing installation: packaging 21.0 Uninstalling packaging-21.0: Successfully uninstalled packaging-21.0 Attempting uninstall: prompt-toolkit Found existing installation: prompt-toolkit 3.0.17 Uninstalling prompt-toolkit-3.0.17: Successfully uninstalled prompt-toolkit-3.0.17 ERROR: pip’s legacy dependency resolver does not consider dependency conflicts when selecting packages. This behaviour is the source of the following dependency conflicts. rasa-x 0.41.2 requires attrs<20.0,>=19.3, but you’ll have attrs 21.2.0 which is incompatible. rasa-x 0.41.2 requires kafka-python<2.0,>=1.4, but you’ll have kafka-python 2.0.2 which is incompatible. rasa-x 0.41.2 requires questionary<1.6.0,>=1.5.1, but you’ll have questionary 1.9.0 which is incompatible. rasa-x 0.41.2 requires sanic-jwt<2.0.0,>=1.6.0, but you’ll have sanic-jwt 1.5.0 which is incompatible. rasa-x 0.41.2 requires ujson<2.0,>=1.35, but you’ll have ujson 4.0.2 which is incompatible. Successfully installed GitPython-3.1.18 Mako-1.1.4 alembic-1.4.3 croniter-1.0.15 gitdb-4.0.7 isodate-0.6.0 packaging-20.9 pika-1.2.0 prompt-toolkit-2.0.10 python-editor-1.0.4 rasa-x-0.41.2 smmap-4.0.0

========================================================================================

Do you think, i should have older version of above library (like attrs<20.0,>=19.3 / kafka-python<2.0,>=1.4 / questionary<1.6.0,>=1.5.1 / sanic-jwt<2.0.0,>=1.6.0 / ujson<2.0,>=1.35)

@sharifm You want to install Rasa-X local right? Yes or No?

@sharifm From where you have seen this command: pip install rasa-x -i https://pypi.rasa.com/simple --use-deprecated=legacy-resolver , why there is -i what is the significance of this?

Yes, I trying it locally.

@sharifm

Please create the new fresh environment and follow these steps, if you have already installed Anaconda you can leave the Anaconda installation process.

Need to install Anaconda First https://youtu.be/GlR60CvTh8A only follow the anaconda installation process, nothing more. Switch to below process.

create a project folder rasa

    1. conda create -name “Your_Environment_Name” python=3.8 or python==3.7.7
    2. conda activate Your_Environment_Name
    3. pip install pip==20.2 --user
    4. pip install rasa-sdk==2.8.1
    5. pip install rasa==2.8.0
    6. pip install rasa-x --extra-index-url https://pypi.rasa.com/simple
    7. rasa init     follow the instructions
    8. running rasa type rasa shell 
    9. for training the bot rasa train
    10. In new separate terminal for custom action i.e action.py run rasa run actions

Whilst, installing you will see some package and dependencies error, please install that, but only >= one.

Most Common Errors: Can arise some sets of dependencies errors, please just install as it mentioned but just install >= one only.

  • much common error is multidic please follow this pip install sanic==20.9.0 and then install pip install multidict==4.7.6

Note: You can able to install and see the rasa installation whilst using rasa --version

Please share, the upcoming errors whilst following this process. Good Luck!

Note: This process is able to install Rasa-X but if you encountered other issues, please check the other threads also for different installation, in conversation.

I don’t know , i just looked at help in RASA community forum and decided to run same command.

Here is the link < RASA X unable to install via anaconda - #5 by ChrisRahme >

-i is shorthand for --extra-index-url

I did that in separate env (d:/bot_poc) and installed <python=3.8.8> , tensorflow<2.3.0>.
I just uninstalled RASA-X. Anyway-I will create new env again and follow your above steps.

@sharifm Here I uploaded the Lib and Scripts folders of a Rasa virtual environment, you can download them and extract them in the root of your virtual environment folder (rasa_test_1) if the following versions match yours (or if you have no problem using these versions):

Rasa Version     : 2.8.0
Rasa SDK Version : 2.8.0
Rasa X Version   : 0.41.2
Python Version   : 3.8.0
Operating System : Windows 10

I still recommend to create a backup of your old virtual environment folder just in case.

Sure. thanks. NIK. Will update you here after sometime. Thanks for you response.

@ChrisRahme Thanks buddy, for this information and clarity. I never used with this - i , as I not much work on Rasa-X. But, I noted :wink:

1 Like

Sure. I don’t need old env. It was just for testing purpose. We’ll redo the same. will update here may be tomorrow my morning time (i.e. IST timezone)

1 Like

@sharifm Do follow both process/suggestions separately don’t make the cocktail of code :stuck_out_tongue: Good Luck!.

1 Like

Haha yup

I suggest trying @nik202’s solution first because the downloads in my solution are pretty big.

This solutions didn’t work. I executed all the steps mentioned above, I don’t think “rasa x : version 0.41.2” is compatible with Sqlalchemy library version " 1.4.22". PFA doc for more details. rasa_x_0-41-2__issue.txt (12.2 KB) Rasa x failed to start with same reason as before , see below I will uninstall current "rasa x : version 0.41.2 and try version 0.32.0 as mentioned in Installing Rasa X Locally on Windows 10 - YouTube

1 Like

@sharifm Please downgrade rasa x to 0.39.3 with compatible version of rasa and rasa-sdk; it can be 2.8.0 and 2.8.1 or as per compatibility your wish. Python Verison can be 3.8.8. it will surely solve your issue.

Some errors and its solution if encountered:

error: ImportError: cannot import name ‘RowProxy’ from ‘sqlalchemy.engine’ try running pip install SQLAlchemy==1.3.22 should fix it.

import yaml then run pip install pyyaml

Can come some errors, but now I am sure you will handle them well :slight_smile: This is the clean execution. Good Luck!

If any error, please share with us.

Now getting another error, ACCESS DENIED

ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: ‘C:\Users\JS\AppData\Roaming\Python\Python38\site-packages\_ruamel_yaml.cp38-win_amd64.pyd’ Check the permissions.

Qn - How come other pkg installed previously (like rasa & rasa-sdk)

@sharifm your rasa-sdk is 2.8.0 first change to pip install rasa-sdk==2.8.1; Try install to latest please.

@sharifm This is not related to rasa its environment permission and pip issue.

@sharifm Are you using conda shell which have administrative privileges?

@sharifm

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

Its 2.8.0 which you and chris suggested in above post.