Unable to run rasa x on windows local mode (import error)

I’ve created my project with anaconda. rasa works fine. I’ve created rasa x using the command pip install rasa-x --extra-index-url Simple Index all that’s are okay. when I input rasa x command it shows me

(rasaconda) C:\Users\abu ishak\Documents\rasa_bot>rasa x Traceback (most recent call last): File “c:\programdata\anaconda3\envs\rasaconda\lib\runpy.py”, line 193, in run_module_as_main “main”, mod_spec) File “c:\programdata\anaconda3\envs\rasaconda\lib\runpy.py”, line 85, in run_code exec(code, run_globals) File "C:\ProgramData\Anaconda3\envs\rasaconda\Scripts\rasa.exe_main.py", line 7, in File "c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\rasa_main.py", line 92, in main cmdline_arguments.func(cmdline_arguments) File “c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\rasa\cli\x.py”, line 326, in rasa_x run_locally(args) File “c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\rasa\cli\x.py”, line 414, in run_locally from rasax.community import local # pytype: disable=import-error File “c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\rasax\community\local.py”, line 17, in from rasax.community import telemetry, sql_migrations, scheduler File “c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\rasax\community\sql_migrations.py”, line 6, in from alembic import command File “c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\alembic_init_.py”, line 3, in from . import context # noqa ImportError: cannot import name ‘context’ from ‘alembic’ (c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\alembic_init_.py)

(rasaconda) C:\Users\abu ishak\Documents\rasa_bot>

Hey @AbuIshak

Seems like you have some issues with the alembic library. The one Rasa X is tested with is alembic = "^1.0.10".

Could you please try to upgrade it?

Now its showing

(rasaconda) C:\Users\abu ishak\Documents\rasa_bot\rasa_bot_anaconda>rasa x Traceback (most recent call last): File “c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\git_init_.py”, line 83, in refresh() File “c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\git_init_.py”, line 73, in refresh if not Git.refresh(path=path): File “c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\git\cmd.py”, line 278, in refresh raise ImportError(err) ImportError: Bad git executable. The git executable must be specified in one of the following ways: - be included in your $PATH - be set via $GIT_PYTHON_GIT_EXECUTABLE - explicitly set via git.refresh()

All git commands will error until this is rectified.

This initial warning can be silenced or aggravated in the future by setting the $GIT_PYTHON_REFRESH environment variable. Use one of the following values: - quiet|q|silence|s|none|n|0: for no warning or exception - warn|w|warning|1: for a printed warning - error|e|raise|r|2: for a raised exception

Example: export GIT_PYTHON_REFRESH=quiet

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File “c:\programdata\anaconda3\envs\rasaconda\lib\runpy.py”, line 193, in run_module_as_main “main”, mod_spec) File “c:\programdata\anaconda3\envs\rasaconda\lib\runpy.py”, line 85, in run_code exec(code, run_globals) File "C:\ProgramData\Anaconda3\envs\rasaconda\Scripts\rasa.exe_main.py", line 7, in File "c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\rasa_main.py", line 92, in main cmdline_arguments.func(cmdline_arguments) File “c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\rasa\cli\x.py”, line 326, in rasa_x run_locally(args) File “c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\rasa\cli\x.py”, line 414, in run_locally from rasax.community import local # pytype: disable=import-error File “c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\rasax\community\local.py”, line 25, in import rasax.community.server as rasa_x_server File “c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\rasax\community\server.py”, line 4, in from rasax.community.services.integrated_version_control.git_service import GitService File “c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\rasax\community\services\integrated_version_control\git_service.py”, line 13, in from git import Repo, Reference, PushInfo, RemoteReference, Actor File “c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\git_init_.py”, line 85, in raise ImportError(‘Failed to initialize: {0}’.format(exc)) from exc ImportError: Failed to initialize: Bad git executable. The git executable must be specified in one of the following ways: - be included in your $PATH - be set via $GIT_PYTHON_GIT_EXECUTABLE - explicitly set via git.refresh()

All git commands will error until this is rectified.

This initial warning can be silenced or aggravated in the future by setting the $GIT_PYTHON_REFRESH environment variable. Use one of the following values: - quiet|q|silence|s|none|n|0: for no warning or exception - warn|w|warning|1: for a printed warning - error|e|raise|r|2: for a raised exception

Example: export GIT_PYTHON_REFRESH=quiet

(rasaconda) C:\Users\abu ishak\Documents\rasa_bot\rasa_bot_anaconda>

Hey @AbuIshak

According to the log message you’ve attached, you don’t have a valid git executable in your environment.

Dear Alexander Khizov I type in cmd set GIT_PYTHON_REFRESH=quiet. Now it opens my browser when I type rasa x. But cmd shows me some errors continuous.

(rasaconda) C:\Users\abu ishak\Documents\rasa_bot\rasa_bot_anaconda>set GIT_PYTHON_REFRESH=quiet

(rasaconda) C:\Users\abu ishak\Documents\rasa_bot\rasa_bot_anaconda>rasa x
Before you can use Rasa X, you have to agree to its license agreement (you will only have to do this once).
? Would you like to view the license agreement in your web browser?  No

Rasa X License Agreement
===========================

Do you agree to the Rasa X license agreement (https://storage.cloud.google.com/rasa-x-releases/rasa_x_ce_license_agreem
By typing 'y', you agree to the terms. If you are using this software for a company, by confirming, you acknowledge you
If you do not agree, type 'n' to stop Rasa X.  Yes
? Rasa will track a minimal amount of anonymized usage information (like how often the 'train' button is used) to help us improve Rasa X. None of your training data or conversations will ever be sent to Rasa. Are you OK with Rasa collecting anonymized usage data?  Yes
Your decision has been stored in 'C:\Users\abu ishak/.config/rasa/global.yml'.
Starting Rasa X in local mode... 🚀

The server is running at http://localhost:5002/login?username=me&password=***********

2020-08-25 12:10:59 WARNING  sanic.root  - Sanic tried to use loop.add_signal_handler but it is not implemented on this platform.
2020-08-25 12:10:59 WARNING  sanic.root  - Sanic tried to use loop.add_signal_handler but it is not implemented on this platform.
An error occured when trying to send the telemetry event: HTTPSConnectionPool(host='api.segment.io', port=443): Read timed out. (read timeout=2)
[2020-08-25 12:11:29 +0600] [3664] [ERROR] Exception occurred while handling uri: 'http://localhost:5005/socket.io/?EIO=3&transport=polling&t=NGaFYW-'
Traceback (most recent call last):
  File "c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\sanic\app.py", line 940, in handle_request
    handler, args, kwargs, uri, name = self.router.get(request)
  File "c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\sanic\router.py", line 411, in get
    return self._get(request.path, request.method, "")
  File "c:\programdata\anaconda3\envs\rasaconda\lib\site-packages\sanic\router.py", line 475, in _get
    raise NotFound("Requested URL {} not found".format(url))
sanic.exceptions.NotFound: Requested URL /socket.io/ not found
[2020-08-25 12:11:36 +0600] [3664] [ERROR] Exception occurred while handling uri: 'http://localhost:5005/socket.io/?EIO=3&transport=polling&t=NGaFajV'

would you please tell me what should I do naw?

Hey @AbuIshak

Requested URL /socket.io/ not found

What is your setup? Looks like you’re trying to use socket.io without enabling in in the configuration. Check the docs here.