Error while starting rasa x

Can someone please help me with this error which is occurring when "rasa x " is used

Rasa Version      :         2.8.16
Minimum Compatible Version: 2.8.9
Rasa SDK Version  :         2.8.3
Rasa X Version    :         1.0.0
Python Version    :         3.8.4rc1
Operating System  :         Windows-10-10.0.19041-SP0

@nik202 if possible can you please help me out with this

(rasabot) E:\Rasa Project>rasa x
Preparing the local database...
2021-12-26 00:18:23 ERROR    asyncio  - Error on reading from the event loop self pipe
loop: <ProactorEventLoop running=True closed=False debug=False>
Traceback (most recent call last):
  File "C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\windows_events.py", line 453, in finish_recv
    return ov.getresult()
OSError: [WinError 995] The I/O operation has been aborted because of either a thread exit or an application request

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\proactor_events.py", line 768, in _loop_self_reading
    f.result()  # may raise
  File "C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\windows_events.py", line 808, in _poll
    value = callback(transferred, key, ov)
  File "C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\windows_events.py", line 457, in finish_recv
    raise ConnectionResetError(*exc.args)
ConnectionResetError: [WinError 995] The I/O operation has been aborted because of either a thread exit or an application request
Traceback (most recent call last):
  File "c:\users\abhishikt\rasabot\lib\site-packages\sqlalchemy\engine\base.py", line 1802, in _execute_context
    self.dialect.do_execute(
  File "c:\users\abhishikt\rasabot\lib\site-packages\sqlalchemy\engine\default.py", line 732, in do_execute
    cursor.execute(statement, parameters)
sqlite3.OperationalError: no such function: json_extract

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

Traceback (most recent call last):
  File "c:\users\abhishikt\rasabot\lib\site-packages\rasa\cli\x.py", line 496, in run_locally
    local.main(
  File "c:\users\abhishikt\rasabot\lib\site-packages\rasax\community\local.py", line 196, in main
    sql_migrations.run_migrations(session)
  File "c:\users\abhishikt\rasabot\lib\site-packages\rasax\community\sql_migrations.py", line 35, in run_migrations
    _run_schema_migrations(session)
  File "c:\users\abhishikt\rasabot\lib\site-packages\rasax\community\sql_migrations.py", line 52, in _run_schema_migrations
    _run_alembic_migration(alembic_config)
  File "c:\users\abhishikt\rasabot\lib\site-packages\rasax\community\sql_migrations.py", line 76, in _run_alembic_migration
    command.upgrade(alembic_config, target_revision)
  File "c:\users\abhishikt\rasabot\lib\site-packages\alembic\command.py", line 298, in upgrade
    script.run_env()
  File "c:\users\abhishikt\rasabot\lib\site-packages\alembic\script\base.py", line 489, in run_env
    util.load_python_file(self.dir, "env.py")
  File "c:\users\abhishikt\rasabot\lib\site-packages\alembic\util\pyfiles.py", line 98, in load_python_file
    module = load_module_py(module_id, path)
  File "c:\users\abhishikt\rasabot\lib\site-packages\alembic\util\compat.py", line 184, in load_module_py
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "c:\users\abhishikt\rasabot\lib\site-packages\rasax\community\database\schema_migrations\alembic\env.py", line 96, in <module>
    run_migrations_online()
  File "c:\users\abhishikt\rasabot\lib\site-packages\rasax\community\database\schema_migrations\alembic\env.py", line 86, in run_migrations_online
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "c:\users\abhishikt\rasabot\lib\site-packages\alembic\runtime\environment.py", line 846, in run_migrations
    self.get_context().run_migrations(**kw)
  File "c:\users\abhishikt\rasabot\lib\site-packages\alembic\runtime\migration.py", line 522, in run_migrations
    step.migration_fn(**kw)
  File "c:\users\abhishikt\rasabot\lib\site-packages\rasax\community\database\schema_migrations\alembic\versions\migration_2021_08_13_statistic_on_used_channel_names_017cb274256f.py", line 80, in upgrade
    _migrate_events(session)
  File "c:\users\abhishikt\rasabot\lib\site-packages\rasax\community\database\schema_migrations\alembic\versions\migration_2021_08_13_statistic_on_used_channel_names_017cb274256f.py", line 50, in _migrate_events
    results = session.execute(_input_channel_query())
  File "c:\users\abhishikt\rasabot\lib\site-packages\sqlalchemy\orm\session.py", line 1692, in execute
    result = conn._execute_20(statement, params or {}, execution_options)
  File "c:\users\abhishikt\rasabot\lib\site-packages\sqlalchemy\engine\base.py", line 1614, in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
  File "c:\users\abhishikt\rasabot\lib\site-packages\sqlalchemy\sql\elements.py", line 325, in _execute_on_connection
    return connection._execute_clauseelement(
  File "c:\users\abhishikt\rasabot\lib\site-packages\sqlalchemy\engine\base.py", line 1481, in _execute_clauseelement
    ret = self._execute_context(
  File "c:\users\abhishikt\rasabot\lib\site-packages\sqlalchemy\engine\base.py", line 1845, in _execute_context
    self._handle_dbapi_exception(
  File "c:\users\abhishikt\rasabot\lib\site-packages\sqlalchemy\engine\base.py", line 2026, in _handle_dbapi_exception
    util.raise_(
  File "c:\users\abhishikt\rasabot\lib\site-packages\sqlalchemy\util\compat.py", line 207, in raise_
    raise exception
  File "c:\users\abhishikt\rasabot\lib\site-packages\sqlalchemy\engine\base.py", line 1802, in _execute_context
    self.dialect.do_execute(
  File "c:\users\abhishikt\rasabot\lib\site-packages\sqlalchemy\engine\default.py", line 732, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such function: json_extract
[SQL: SELECT   json_extract(data, '$.input_channel') as input_channel,   COUNT(json_extract(data, '$.input_channel')) as count FROM conversation_event WHERE json_extract(data, '$.input_channel') IS NOT NULL GROUP BY json_extract(data, '$.input_channel')]
(Background on this error at: https://sqlalche.me/e/14/e3q8)

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/.

@abhishikth_raj did you followed the rasa init step before running rasa x?

@nik202 Yes I followed the step rasa init

@abhishikth_raj strange, at the time of installation did you missed any dependencies? @abhishikth_raj try downgrade rasa version to 2.8.14 and then install again rasa x, take care of all the dependencies which show in red.

Do keep me posted. Thanks.

@nik202 downgrading rasa to 2.8.14 and rasa x to 0.42.6 worked partially for once and I tried multiple times after that but this is the error

(rasabot) E:\Rasa Project>rasa x Starting Rasa X in local mode… :rocket: 2021-12-26 23:32:20 WARNING rasax.community.services.insights.insight_service - No local evaluation result files found. 2021-12-26 23:32:23 ERROR concurrent.futures - exception calling callback for <Future at 0x1b349a2fac0 state=finished raised gaierror> Traceback (most recent call last): File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\concurrent\futures\thread.py”, line 57, in run result = self.fn(*self.args, **self.kwargs) File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\socket.py”, line 918, 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:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\concurrent\futures_base.py”, line 328, in _invoke_callbacks
callback(self) File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\futures.py”, line 374, in _call_set_state dest_loop.call_soon_threadsafe(_set_state, destination, source) File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py”, line 764, in call_soon_threadsafe
self._check_closed() File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py”, line 508, in _check_closed raise RuntimeError(‘Event loop is closed’) RuntimeError: Event loop is closed 2021-12-26 23:32:23 ERROR concurrent.futures - exception calling callback for <Future at 0x1b349a39040 state=finished returned list> Traceback (most recent call last): File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\concurrent\futures_base.py”, line 328, in _invoke_callbacks
callback(self) File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\futures.py”, line 374, in _call_set_state dest_loop.call_soon_threadsafe(_set_state, destination, source) File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py”, line 764, in call_soon_threadsafe
self._check_closed() File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py”, line 508, 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): Max retries exceeded with url: /v1/track (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x000001DEA51848B0>, ‘Connection to localhost timed out. (connect timeout=2)’)) WARNING:rasax.community.telemetry:An error occured when trying to send the telemetry event: HTTPSConnectionPool(host=‘api.segment.io’, port=443): Max retries exceeded with url: /v1/track (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x000001DEA51AD190>, ‘Connection to localhost timed out. (connect timeout=2)’)) Traceback (most recent call last): File “c:\users\abhishikt\rasabot\lib\site-packages\rasa\cli\x.py”, line 496, in run_locally local.main( File “c:\users\abhishikt\rasabot\lib\site-packages\rasax\community\local.py”, line 257, in main common_utils.run_in_loop(model_service.discover_models()) File “c:\users\abhishikt\rasabot\lib\site-packages\rasax\community\utils\common.py”, line 900, in run_in_loop return loop.run_until_complete(coro) File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py”, line 616, in run_until_complete
return future.result() File “c:\users\abhishikt\rasabot\lib\site-packages\rasax\community\services\model_service.py”, line 821, in discover_models
await model_service.discover_models() File “c:\users\abhishikt\rasabot\lib\site-packages\rasax\community\services\model_service.py”, line 147, in discover_models
await _run_loop(max_retries, sleep_in_seconds) File “c:\users\abhishikt\rasabot\lib\site-packages\rasax\community\services\model_service.py”, line 133, in _run_loop await self._discover_models() File “c:\users\abhishikt\rasabot\lib\site-packages\rasax\community\services\model_service.py”, line 185, in _discover_models
minimum_version = await self._retry_fetching_minimum_compatible_version() File “c:\users\abhishikt\rasabot\lib\site-packages\rasax\community\services\model_service.py”, line 174, in _retry_fetching_minimum_compatible_version minimum_version = await self.minimum_compatible_version() File “c:\users\abhishikt\rasabot\lib\site-packages\rasax\community\services\model_service.py”, line 160, in minimum_compatible_version info = await stack_service.version() File “c:\users\abhishikt\rasabot\lib\site-packages\rasax\community\services\stack_service.py”, line 112, in version response = await session.get( File “c:\users\abhishikt\rasabot\lib\site-packages\aiohttp\client.py”, line 619, in _request break File “c:\users\abhishikt\rasabot\lib\site-packages\aiohttp\helpers.py”, line 656, in exit raise asyncio.TimeoutError from None asyncio.exceptions.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: http://forum.rasa.com/.

@abhishikth_raj is you able to talk with bot on browser and you see this error in terminal?

@nik202 No! For the first time rasa x opened on browser but I could see even my basic model. Then I stopped and restarted it and this is the error showing up. Also, Rasa X is not opening on the browser from then

@abhishikth_raj Did you need GitHub to be connected with Rasa X also, or you just want to experiment? @abhishikth_raj If you want I can suggest you alternative solution for the same?

@nik202 I’m just a beginner and trying to build a chatbot for my Bachelors of Technology degree final year project. Till now I had no plans of connecting Rasa X to github but later I might consider doing that. As of now I just want to get started with this. Please do suggest the alternative solution please. Also if possible can you as suggest me any tutorials or sources where I can learn rasa quickly and build a bot as soon as possible?

@abhishikth_raj Sure, I’ll try to help you as much as I can.

@abhishikth_raj Please follow this thread and do exact mention in this thread: Rasa X runs with several Errors & Warnings - #2 by nik202

@abhishikth_raj I’d recommend to create a fresh python environment.

@abhishikth_raj

Valuable links and resources for your reference

  1. RasaMasterclass
  2. Conversational AI with Rasa - Video Series [Latest]
  3. Rasa for Beginners
  4. Rasa Certification Workshop
  5. Rasa Advanced Custom Actions, Forms, & Responses Workshop No-longer accepting enrolment
  6. Rasa Advanced Deployment Workshop
  7. Rasa Youtube Channel Please subscribe and hit the bell icon for notification.
  8. Rasa Github Mini Project
  9. Rasa Masterclass Handbook
  10. Hardcopy Book : Conversational AI with Rasa

I hope these links will help you to learn Rasa!

Note: Rasa Just upgraded its version from 2.x to 3.x and Its a major version now, so if you see the tutorials, blogs, etc keep it in mind that it’s based on rasa 2.x and do check all the documents based on 2.x and 3.x respectively. Even follow the rasa youtube channel.

@nik202 I have created virtual environment directly by the command python -m venv ./chatbot without anacond is that fine?

@abhishikth_raj It depends. I generally make the conda base environment and its also recommended in Rasa doc, but just fine just do it and do see this video also later: Installing Rasa Open Source: Windows 10 (Updated 2021) - YouTube

@nik202 The browser opened up but having these errors…

(rasabot) E:\Rasa Project>rasa x Starting Rasa X in local mode… :rocket: 2021-12-27 00:30:39 ERROR asyncio - Error on reading from the event loop self pipe loop: Traceback (most recent call last): File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\windows_events.py”, line 453, in finish_recv return ov.getresult() OSError: [WinError 995] The I/O operation has been aborted because of either a thread exit or an application request

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\proactor_events.py”, line 768, in _loop_self_reading f.result() # may raise File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\windows_events.py”, line 808, in _poll value = callback(transferred, key, ov) File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\windows_events.py”, line 457, in finish_recv raise ConnectionResetError(*exc.args) ConnectionResetError: [WinError 995] The I/O operation has been aborted because of either a thread exit or an application request 2021-12-27 00:30:54 WARNING rasax.community.services.insights.insight_service - No local evaluation result files found. 2021-12-27 00:30:56 ERROR concurrent.futures - exception calling callback for <Future at 0x28a51357460 state=finished raised gaierror> Traceback (most recent call last): File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\concurrent\futures\thread.py”, line 57, in run result = self.fn(*self.args, **self.kwargs) File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\socket.py”, line 918, 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:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\concurrent\futures_base.py”, line 328, in _invoke_callbacks callback(self) File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\futures.py”, line 374, in _call_set_state dest_loop.call_soon_threadsafe(_set_state, destination, source) File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py”, line 764, in call_soon_threadsafe self._check_closed() File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py”, line 508, in _check_closed raise RuntimeError(‘Event loop is closed’) RuntimeError: Event loop is closed 2021-12-27 00:30:56 ERROR concurrent.futures - exception calling callback for <Future at 0x28a51357be0 state=finished returned list> Traceback (most recent call last): File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\concurrent\futures_base.py”, line 328, in _invoke_callbacks callback(self) File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\futures.py”, line 374, in _call_set_state dest_loop.call_soon_threadsafe(_set_state, destination, source) File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py”, line 764, in call_soon_threadsafe self._check_closed() File “C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py”, line 508, in _check_closed raise RuntimeError(‘Event loop is closed’) RuntimeError: Event loop is closed [2021-12-27 00:30:58 +0530] [9764] [INFO] Goin’ Fast @ http://0.0.0.0:5002 2021-12-27 00:30:58 INFO sanic.root - Goin’ Fast @ http://0.0.0.0:5002

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

[2021-12-27 00:30:59 +0530] [9764] [INFO] Starting worker [9764] 2021-12-27 00:30:59 INFO sanic.root - Starting worker [9764] 2021-12-27 00:31:00 ERROR asyncio - Task was destroyed but it is pending! task: <Task pending name=‘Task-9’ coro=<TCPConnector._resolve_host() running at c:\users\abhishikt\rasabot\lib\site-packages\aiohttp\connector.py:865> wait_for=<Future pending cb=[_chain_future.._call_check_cancel() at C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\futures.py:360, <TaskWakeupMethWrapper object at 0x0000028A513574F0>()]> cb=[TCPConnector._create_direct_connection..drop_exception() at c:\users\abhishikt\rasabot\lib\site-packages\aiohttp\connector.py:1002]> 2021-12-27 00:31:00 ERROR asyncio - Task was destroyed but it is pending! task: <Task pending name=‘Task-8’ coro=<TCPConnector._resolve_host() running at c:\users\abhishikt\rasabot\lib\site-packages\aiohttp\connector.py:865> wait_for=<Future pending cb=[_chain_future.._call_check_cancel() at C:\Users\Abhishikt\AppData\Local\Programs\Python\Python38\lib\asyncio\futures.py:360, <TaskWakeupMethWrapper object at 0x0000028A51357910>()]> cb=[TCPConnector._create_direct_connection..drop_exception() at c:\users\abhishikt\rasabot\lib\site-packages\aiohttp\connector.py:1002]> 2021-12-27 00:31:47 WARNING rasa.shared.utils.common - The UnexpecTED Intent Policy is currently experimental and might change or be removed in the future :microscope: Please share your feedback on it in the forum (http://forum.rasa.com) to help us make this feature ready for production.

@abhishikth_raj share rasa --version and confirm me that bot is opening in browser and where you able to talk?

@abhishikth_raj do clean the cookies and cache from default browser also, recommended to use google chrome.

@nik202 Rasa Version : 2.8.1 Minimum Compatible Version: 2.8.0 Rasa SDK Version : 2.8.1 Rasa X Version : 0.39.3 Python Version : 3.8.4rc1 Operating System : Windows-10-10.0.19041-SP0

@nik202 I have followed every bit of that thread.

@abhishikth_raj you not answered my above post second question?

@nik202 The bot is opening in the browser but the bot is giving wrong answers… It is taking wrong intents

@abhishikth_raj you using your project or rasa init default project i.e moodbot? share some screenshot?

@nik202 I didn’t get you I started of with rasa init command then rasa x