Rasa X doesn't work in windows 10

Please help. When I run the rasa x command, I get the below error in the command prompt

Rasa Version : 2.8.0 Minimum Compatible Version: 2.8.0 Rasa SDK Version : 2.8.1 Rasa X Version : 0.41.0 Python Version : 3.7.5 Operating System : Windows-10-10.0.19041-SP0 Python Path : d:\pycharmprojects\rasa\venv\scripts\python.exe


rasa x

Starting Rasa X in local mode… � 2021-08-30 17:03:37 WARNING rasax.community.services.insights.insight_service - No local evaluation result files found. Traceback (most recent call last): File “d:\pycharmprojects\rasa\venv\lib\site-packages\rasa\cli\x.py”, line 502, in run_locally domain_path=domain_path, File “d:\pycharmprojects\rasa\venv\lib\site-packages\rasax\community\local.py”, line 257, in main common_utils.run_in_loop(model_service.discover_models()) File “d:\pycharmprojects\rasa\venv\lib\site-packages\rasax\community\utils\common.py”, line 900, in run_in_loop return loop.run_until_complete(coro) File “C:\Python37\lib\asyncio\base_events.py”, line 579, in run_until_complete return future.result() File “d:\pycharmprojects\rasa\venv\lib\site-packages\rasax\community\services\model_service.py”, line 821, in di scover_models await model_service.discover_models() File “d:\pycharmprojects\rasa\venv\lib\site-packages\rasax\community\services\model_service.py”, line 147, in di scover_models await _run_loop(max_retries, sleep_in_seconds) File “d:\pycharmprojects\rasa\venv\lib\site-packages\rasax\community\services\model_service.py”, line 133, in _r un_loop await self._discover_models() File “d:\pycharmprojects\rasa\venv\lib\site-packages\rasax\community\services\model_service.py”, line 185, in _d iscover_models minimum_version = await self._retry_fetching_minimum_compatible_version() File “d:\pycharmprojects\rasa\venv\lib\site-packages\rasax\community\services\model_service.py”, line 174, in _r etry_fetching_minimum_compatible_version minimum_version = await self.minimum_compatible_version() File “d:\pycharmprojects\rasa\venv\lib\site-packages\rasax\community\services\model_service.py”, line 160, in mi nimum_compatible_version info = await stack_service.version() File “d:\pycharmprojects\rasa\venv\lib\site-packages\rasax\community\services\stack_service.py”, line 95, in ver sion timeout=timeout_in_seconds, File “d:\pycharmprojects\rasa\venv\lib\site-packages\aiohttp\client.py”, line 582, in _request break File “d:\pycharmprojects\rasa\venv\lib\site-packages\aiohttp\helpers.py”, line 596, in exit raise asyncio.TimeoutError from None concurrent.futures._base.TimeoutError

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: https://forum.rasa.com/

@meli_javan please share rasa version rasa --version

@meli_javan Follow these steps and you will be able to Run Rasa X

I’d recommend to create a fresh conda environment with python 3.8 and follow the step

`pip install rasa==2.8.1`
`pip install rasa-sdk==2.8.1'

check version rasa --version its install or not

then

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

check rasa version rasa --version its install or not

You will see some error : ImportError: cannot import name ‘RowProxy’ from ‘sqlalchemy.engine’ Install

pip install SQLAlchemy==1.3.22 should fix it

If sanic related error: pip install sanic-jwt==1.6.0

delete .db if is showing alembic issue.

I hope this will solve your issue and when it run please close this thread with the solution for others. Good luck!

1 Like

I’ve tried rasa-x==0.39.x and it didn’t work unfortunately.

@meli_javan Please create the new environment and follow the above mention steps, If not then we will solve the error together? Ok?

@meli_javan Any python version can work i.e 3.6, 3.7 or 3.8. I just want that you install in a fresh env.

@meli_javan for faster reply do mention @ and nik202 for direct notification. Thanks.

1 Like

Thanks a million

@meli_javan First solved the issue and then I will accept the thanks :slight_smile: If this solution not worked then ? :stuck_out_tongue:

:joy: :grin: Anyway I’m thankful for quick response :pray:t2:

@meli_javan Ok ok. No worries please now run the code. Thanks it’s fine accepted :pray:

Hi again @nik202 ! I did everything you said, and it works now but there are some errors in terminal : :point_down:t2: is it normal?

@meli_javan please share rasa version rasa --version

:worried: :frowning_face: @nik202

@meli_javan Don’t worry, I am sure you missed some dependencies :slight_smile:

@meli_javan Did you install rasa init project, if yes please run rasa x again and tell me what is your current error?

@meli_javan You are using PyCharm and you are in d: drive hmmm

@meli_javan

Possible Solution 1:

  1. Go to the directory: venv/Lib/site-packages/rasa/core/channels/console.py
  2. Change the default value of DEFAULT_STREAM_READING_TIMEOUT_IN_SECONDS to more than 10, what ever time you required may be 30.

run and check the error or share screenshoot

@meli_javan

Possible Solution 2:

From command prompt

  1. SET http_proxy=http://localhost:5002
  2. SET https_proxy=http://localhost:5002

run and check the error or share screenshoot

I not seen this error since ages, but don’t know how you got this error :frowning:

Dear @nik202 I did both possible solutions 1 and 2. and yes I installed rasa init before rasa x and also all of them in an isolated venv. but same error occurred. you know rasa x loads in browser but same error ( in below ) in terminal. :frowning:

2021-08-31 11:45:59 WARNING  rasax.community.services.insights.insight_service  - No local evaluation result files found.
2021-08-31 11:46:02 ERROR    concurrent.futures  - exception calling callback for <Future at 0x1e6ae28a888 state=finished raised gaierror>
Traceback (most recent call last):
  File "C:\Python37\lib\concurrent\futures\thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\Python37\lib\socket.py", line 748, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python37\lib\concurrent\futures\_base.py", line 324, in _invoke_callbacks
    callback(self)
  File "C:\Python37\lib\asyncio\futures.py", line 362, in _call_set_state
    dest_loop.call_soon_threadsafe(_set_state, destination, source)
  File "C:\Python37\lib\asyncio\base_events.py", line 728, in call_soon_threadsafe
    self._check_closed()
  File "C:\Python37\lib\asyncio\base_events.py", line 475, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
2021-08-31 11:46:02 ERROR    concurrent.futures  - exception calling callback for <Future at 0x1e6ae28a848 state=finished returned list>
Traceback (most recent call last):
  File "C:\Python37\lib\concurrent\futures\_base.py", line 324, in _invoke_callbacks
    callback(self)
  File "C:\Python37\lib\asyncio\futures.py", line 362, in _call_set_state
    dest_loop.call_soon_threadsafe(_set_state, destination, source)
  File "C:\Python37\lib\asyncio\base_events.py", line 728, in call_soon_threadsafe
    self._check_closed()
  File "C:\Python37\lib\asyncio\base_events.py", line 475, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
WARNING:rasax.community.telemetry:An error occured when trying to send the telemetry event: HTTPSConnectionPool(host='api.segment.io', port=443): Read timed out. (read timeout=2)
WARNING:rasax.community.telemetry:An error occured when trying to send the telemetry event: HTTPSConnectionPool(host='api.segment.io', port=443): Read timed out. (read timeout=2)
2021-08-31 11:46:10 ERROR    asyncio  - Task was destroyed but it is pending!
task: <Task pending coro=<TCPConnector._resolve_host() done, defined at d:\pycharmprojects\rasa2\venv\lib\site-packages\aiohttp\connector.py:806> wait_for=<Future pending cb=[_chain_futur
e.<locals>._call_check_cancel() at C:\Python37\lib\asyncio\futures.py:348, <TaskWakeupMethWrapper object at 0x000001E6AE289D98>()]> cb=[TCPConnector._create_direct_connection.<locals>.dro
p_exception() at d:\pycharmprojects\rasa2\venv\lib\site-packages\aiohttp\connector.py:1002]>
[2021-08-31 11:46:10 +0430] [16672] [INFO] Goin' Fast @ http://0.0.0.0:5002
2021-08-31 11:46:10 INFO     sanic.root  - Goin' Fast @ http://0.0.0.0:5002

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

[2021-08-31 11:46:12 +0430] [16672] [INFO] Starting worker [16672]
2021-08-31 11:46:12 INFO     sanic.root  - Starting worker [16672]

@nik202 After debugging I realized that InvalidSignatureError could not import from jwt in venv\Lib\site-packages\rasax\community\jwt.py

Console :point_down:t2: :point_down:t2: :point_down:t2:

Traceback (most recent call last):
  File "D:/PycharmProjects/rasa2/venv/Lib/site-packages/rasax/community/__main__.py", line 17, in <module>
    from rasax.community.server import main
  File "D:\PycharmProjects\rasa2\venv\lib\site-packages\rasax\community\server.py", line 6, in <module>
    from rasax.community.services.integrated_version_control import git_service
  File "D:\PycharmProjects\rasa2\venv\lib\site-packages\rasax\community\services\integrated_version_control\git_service.py", line 31, in <module>
    import rasax.community.initialise
  File "D:\PycharmProjects\rasa2\venv\lib\site-packages\rasax\community\initialise.py", line 18, in <module>
    from rasax.community.services.user_service import UserService
  File "D:\PycharmProjects\rasa2\venv\lib\site-packages\rasax\community\services\user_service.py", line 8, in <module>
    from sanic_jwt import exceptions
  File "D:\PycharmProjects\rasa2\venv\lib\site-packages\sanic_jwt\__init__.py", line 7, in <module>
    from .authentication import Authentication
  File "D:\PycharmProjects\rasa2\venv\lib\site-packages\sanic_jwt\authentication.py", line 7, in <module>
    import jwt
  File "D:\PycharmProjects\rasa2\venv\Lib\site-packages\rasax\community\jwt.py", line 5, in <module>
    from jwt import InvalidSignatureError
ImportError: cannot import name 'InvalidSignatureError' from 'jwt' (D:\PycharmProjects\rasa2\venv\Lib\site-packages\rasax\community\jwt.py)```

@meli_javan try install this

pip install sanic-jwt==1.6.0

@meli_javan Its not related to rasa I guess, it is related to Anaconda. Where is your anaconda install its C or D drive?

@meli_javan Your venv is not having proper path.

@nik202 I’m using Pycharm. :thinking: and don’t have anaconda, should I install?

@meli_javan gotcha, Yes, you need to install Anaconda (3.7 or 3.8) in C drive only and then create the venv as mention in my above post and copy your project folder in it and then run the code; all you need to do in C drive only. Try use VS code or Sublime?

@meli_javan Do you know how to install Anaconda?

@meli_javan You will get the Anaconda Powershell, which have base mention at the starting, work on that only, not on CMD powershell.

:scream: :pray:t2: :pray:t2: I’m really grateful for your help Nik, I’m gonna install it right now :running_woman:t2: