Solvedrasa Rasa Shell error following tutorial

Rasa Shell gives following error on input

Exception occurred while handling uri: 'http://localhost:5005/webhooks/rest/webhook?stream=true&token=' Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/sanic/app.py", line 946, in handle_request request, request_name=name TypeError: _run_request_middleware() got an unexpected keyword argument 'request_name' Exception occurred in one of response middleware handlers Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/sanic/app.py", line 1017, in handle_request request, response, request_name=name TypeError: _run_response_middleware() got an unexpected keyword argument 'request_name' 2019-12-28 05:06:15 ERROR asyncio - Task exception was never retrieved future: <Task finished coro=<configure_app.<locals>.run_cmdline_io() done, defined at /usr/local/lib/python3.6/dist-packages/rasa/core/run.py:124> exception=ClientResponseError(RequestInfo(url=URL('http://localhost:5005/webhooks/rest/webhook?stream=true&token='), method='POST', headers=<CIMultiDictProxy('Host': 'localhost:5005', 'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Python/3.6 aiohttp/3.6.2', 'Content-Length': '41', 'Content-Type': 'application/json')>, real_url=URL('http://localhost:5005/webhooks/rest/webhook?stream=true&token=')), (), status=500, message='Internal Server Error', headers=<CIMultiDictProxy('Connection': 'keep-alive', 'Keep-Alive': '5', 'Content-Length': '144', 'Content-Type': 'text/html; charset=utf-8')>)> Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/rasa/core/run.py", line 128, in run_cmdline_io server_url=constants.DEFAULT_SERVER_FORMAT.format("http", port) File "/usr/local/lib/python3.6/dist-packages/rasa/core/channels/console.py", line 140, in record_messages async for response in bot_responses: File "/usr/local/lib/python3.6/dist-packages/rasa/core/channels/console.py", line 104, in send_message_receive_stream async with session.post(url, json=payload, raise_for_status=True) as resp: File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 1012, in __aenter__ self._resp = await self._coro File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 588, in _request resp.raise_for_status() File "/usr/local/lib/python3.6/dist-packages/aiohttp/client_reqrep.py", line 946, in raise_for_status headers=self.headers) aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url=URL('http://localhost:5005/webhooks/rest/webhook?stream=true&token=')

Steps to reproduce

On Ubuntu 18.04 LTS as root

apt install python3-dev python3-pip

pip3 install -U pip

python3 --version

Python 3.6.9

pip --version

pip 19.3.1 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)

pip install rasa

Successfully installed ConfigArgParse-0.15.2 Jinja2-2.10.3 MarkupSafe-1.1.1 Pillow-6.2.1 PyJWT-1.7.1 SQLAlchemy-1.3.12 absl-py-0.9.0 aiofiles-0.4.0 aiohttp-3.6.2 apscheduler-3.6.3 astor-0.8.1 async-generator-1.10 async-timeout-3.0.1 attrs-19.3.0 boto3-1.10.45 botocore-1.13.45 bz2file-0.98 cachetools-4.0.0 cloudpickle-1.2.2 colorclass-2.2.0 coloredlogs-10.0 colorhash-1.0.2 contextvars-2.4 cycler-0.10.0 decorator-4.4.1 dill-0.3.1.1 dnspython-1.16.0 docopt-0.6.2 docutils-0.15.2 dopamine-rl-3.0.1 fbmessenger-6.0.0 flask-1.1.1 future-0.18.2 gast-0.2.2 gevent-1.4.0 gin-config-0.3.0 google-api-python-client-1.7.11 google-auth-1.10.0 google-auth-httplib2-0.0.3 google-pasta-0.1.8 googleapis-common-protos-1.6.0 greenlet-0.4.15 grpcio-1.26.0 gunicorn-20.0.4 gym-0.15.4 h11-0.8.1 h2-3.1.1 h5py-2.10.0 hpack-3.0.0 hstspreload-2019.12.25 httptools-0.0.13 httpx-0.9.3 humanfriendly-4.18 hyperframe-5.2.0 idna-ssl-1.1.0 immutables-0.11 importlib-metadata-1.3.0 itsdangerous-1.1.0 jmespath-0.9.4 jsonpickle-1.2 jsonschema-3.2.0 keras-applications-1.0.8 keras-preprocessing-1.1.0 kfac-0.2.0 kiwisolver-1.1.0 markdown-3.1.1 matplotlib-3.1.2 mattermostwrapper-2.1 mesh-tensorflow-0.1.7 more-itertools-8.0.2 mpmath-1.1.0 multidict-4.6.1 networkx-2.3 numpy-1.18.0 oauth2client-4.1.3 opencv-python-4.1.2.30 opt-einsum-3.1.0 packaging-19.2 pika-1.0.1 promise-2.3 prompt-toolkit-2.0.10 protobuf-3.11.2 pydot-1.4.1 pyglet-1.3.2 pykwalify-1.7.0 pymongo-3.10.0 pyparsing-2.4.6 pypng-0.0.20 pyrsistent-0.15.6 python-crfsuite-0.9.6 python-dateutil-2.8.1 python-engineio-3.11.1 python-socketio-4.4.0 python-telegram-bot-11.1.0 pytz-2019.3 questionary-1.4.0 rasa-1.6.0 rasa-sdk-1.6.0 redis-3.3.11 requests-2.22.0 requests-toolbelt-0.9.1 rfc3986-1.3.2 rocketchat-API-0.6.36 rsa-4.0 ruamel.yaml-0.15.100 s3transfer-0.2.1 sanic-19.12.0 sanic-cors-0.9.9.post1 sanic-jwt-1.3.2 sanic-plugins-framework-0.8.2 scikit-learn-0.20.4 scipy-1.4.1 setuptools-42.0.2 sklearn-crfsuite-0.3.6 slackclient-1.3.2 sniffio-1.1.0 sympy-1.5 tabulate-0.8.6 tensor2tensor-1.14.1 tensorboard-1.15.0 tensorflow-1.15.0 tensorflow-datasets-1.3.2 tensorflow-estimator-1.15.1 tensorflow-gan-2.0.0 tensorflow-hub-0.7.0 tensorflow-metadata-0.15.2 tensorflow-probability-0.7.0 termcolor-1.1.0 terminaltables-3.1.0 tqdm-4.41.0 twilio-6.35.1 typing-extensions-3.7.4.1 tzlocal-2.0.0 ujson-1.35 uritemplate-3.0.1 uvloop-0.14.0 wcwidth-0.1.7 webexteamssdk-1.2 websocket-client-0.54.0 websockets-8.1 werkzeug-0.16.0 wrapt-1.11.2 yarl-1.4.2 zipp-0.6.0

rasa init --no-prompt

NLU model training completed.
Your Rasa model is trained and saved at '/root/bots/models/20191228-051836.tar.gz'.
If you want to speak to the assistant, run 'rasa shell' at any time inside the project directory.

rasa shell

$ root - Connecting to channel 'cmdline' which was specified by the '--connector' argument. Any other channels will be ignored. To connect to all given channels, omit the '--connector' argument.
$ root - Starting Rasa server on http://localhost:5005
$ absl - Entry Point [tensor2tensor.envs.tic_tac_toe_env:TicTacToeEnv] registered with id [T2TEnv-TicTacToeEnv-v0]
$: E tensorflow/stream_executor/cuda/cuda_driver.cc:318] failed call to cuInit: UNKNOWN ERROR (303)
Bot loaded. Type a message and press enter (use '/stop' to exit):
Your input ->

hello

Exception occurred while handling uri: 'http://localhost:5005/webhooks/rest/webhook?stream=true&token='
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/sanic/app.py", line 946, in handle_request
request, request_name=name
TypeError: _run_request_middleware() got an unexpected keyword argument 'request_name'
Exception occurred in one of response middleware handlers
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/sanic/app.py", line 1017, in handle_request
request, response, request_name=name
TypeError: _run_response_middleware() got an unexpected keyword argument 'request_name'
2019-12-28 05:06:15 ERROR asyncio - Task exception was never retrieved
future: <Task finished coro=<configure_app..run_cmdline_io() done, defined at /usr/local/lib/python3.6/dist-packages/rasa/core/run.py:124> exception=ClientResponseError(RequestInfo(url=URL('http://localhost:5005/webhooks/rest/webhook?stream=true&token='), method='POST', headers=<CIMultiDictProxy('Host': 'localhost:5005', 'Accept': '/', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Python/3.6 aiohttp/3.6.2', 'Content-Length': '41', 'Content-Type': 'application/json')>, real_url=URL('http://localhost:5005/webhooks/rest/webhook?stream=true&token=')), (), status=500, message='Internal Server Error', headers=<CIMultiDictProxy('Connection': 'keep-alive', 'Keep-Alive': '5', 'Content-Length': '144', 'Content-Type': 'text/html; charset=utf-8')>)>
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/rasa/core/run.py", line 128, in run_cmdline_io
server_url=constants.DEFAULT_SERVER_FORMAT.format("http", port)
File "/usr/local/lib/python3.6/dist-packages/rasa/core/channels/console.py", line 140, in record_messages
async for response in bot_responses:
File "/usr/local/lib/python3.6/dist-packages/rasa/core/channels/console.py", line 104, in send_message_receive_stream
async with session.post(url, json=payload, raise_for_status=True) as resp:
File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 1012, in aenter
self._resp = await self._coro
File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 588, in _request
resp.raise_for_status()
File "/usr/local/lib/python3.6/dist-packages/aiohttp/client_reqrep.py", line 946, in raise_for_status
headers=self.headers)
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url=URL('http://localhost:5005/webhooks/rest/webhook?stream=true&token=')

14 Answers

βœ”οΈAccepted Answer

I found a reason which is the version of sanic doesn't match requirements, and try to install sanic 19.9.0 fix this error.
pip install sanic==19.9.0

Other Answers:

Oh, weird πŸ€” perfect, we'll pinn 19.9.0, thanks for the help πŸ‘

Related Issues:

30
rasa Rasa Shell error following tutorial
I found a reason which is the version of sanic doesn't match requirements and try to install sanic 1...
23
rasa Can't install tensorflow v1.15.0 from requirements.txt
Got this working! Installing collected packages: pip Found existing installation: pip 9.0.1 Uninstal...
22
rasa PolyAI Models - model.tar.gz - No Longer Available?
The previously publicly available ConveRT models appear to have been licensed under the Apache 2.0 l...
14
rasa simple web app for creating training data
Hi i'm done with the basics :) repo online demo For now it's only editing the examples in the rasa_n...
6
rasa TypeError: 'coroutine' object is not iterable
We use asyncio internally agent.load_data is a coroutine that needs to be run and waited for ...
3
rasa Support for external triggers / asynchronous actions
@tabergma Please check if that's somewhat understandable: So Motivation There is currently no way to...
211
telegraf How can I get more documentation on Scenes, Stages and stuff?
I ran into bagful of troubles implementing Scenes myself the main problem is lack of working example...
56
discord.js Slash Commands Support
Documentation has been released on the developer docs! https://discord.com/developers/docs/interacti...
44
InstaPy Login A/B test detected! Trying another string...
To anybody still having this issue on 6.1 Its caused by a typo in the file xpath_compile.py Line 159...
30
discord.js Mocking Discord JS for Unit Testing
It is actually possible to mock discord.js data without relying on Discord API (at least for my use-...
27
InstaPy ERROR Message: unknown error: DevToolsActivePort file doesn't exist
uncomment line chrome_options.add_argument('--no-sandbox') in your instapy.py should fix your proble...
25
InstaPy Not logging in anymore
You can just set the Switch language to False In instapy.py make self.switch_language = False ...
23
ccxt Binance error: Timestamp for this request was 1000ms ahead of the server's time.
@jasonmellone I just synched my clock Unfortunately just synching the clock does not work ...
23
discord.js guildMemberSpeaking event no longer working?
We (discord) now only send speaking event once per WS connection - as our clients dont need this eve...
22
InstaPy Instagram Server Status: error
Solution 1: Add want_check_browser=False Solution 2: Edit the login_util.py file: Find and comment t...
21
InstaPy Selenium Unable to locate element
File: unfollow_util.py Solution: Before: Hi everyone ...
21
discord.js Unhandled error on close
Handle the error event of your client Something simple like client.on('error' console.error); would ...
21
node telegram bot api new-inline-keyboards Bot 2.0
Sure thing Note that the inline keyboard property is an array of arrays where each inner array is a ...
20
botkit Slack RTM retry/reconnect not working
For anyone looking for a reliable solution I have auto-reconnect disabled and use the following code...
17
InstaPy like element has changed
Possible Changes in like_util.py @sionking could this work instead? any fix ? ...
16
InstaPy Raspberry Pi 3+ -> Error occured while deleting cookies
@JoeFertig thanks again! If it comes to that I will definitely check out some other microcomputers F...
16
whatsapp web.js Error: Evaluation failed: TypeError: Cannot read property 'default' of undefined
FIXES: Non-md: npm i github:tuyuribr/whatsapp-web.js#patch-9 MD: npm i github:tuyuribr/whatsapp-web....
15
ccxt Bitfinex margin trading
Hi! Bitfinex has several types of accounts including an exchange account and a margin account ...
15
discord.js Structures
You install a library that overrides a class's send method to add internal tracking for auto-editabl...
14
PokemonGo Bot Encrypt.so Not found
For Mac/Linux: 2016-08-07 11:36:50,885 [ cli] [INFO] PokemonGO Bot v1.0 2016-08-07 11:36:50,887 [ cl...
14
discord.js Error: Members didn't arrive in time.
As of 27/10/2020 (warned since October 7 2020) Discord bot not caching all members and giving wrong ...
14
discord.js Timeout - Shards With Unavailable Guilds Not Starting
I fixed this problem for my shard.js πŸ˜‡πŸ₯³ Please describe the problem you are having in as much deta...
14
botframework sdk [Feature Request] Facebook Messenger Feature Requests
We would like support for the Facebook handover protocol We are able to able to pass thread control ...
13
discord.js playFile/playStream fails to play short (<1 sec) files
Really happy to announced this is finally fixed on the indev-prism branch! πŸŽ‰ While this isn't compl...
13
BotFramework WebChat showing special character (Ò€ℒ) instead of β€˜ (apostrophe) character
I can reproduce this reliably for things like three dots in a row (...) on Safari and Chrome on OSX ...
12
ChatterBot AttributeError: 'ChatBot' object has no attribute 'set_trainer'
Hi @Chingcham make sure you are viewing the latest version of the documentation for 1.0.0a3 The defa...
12
whatsapp web.js Found Errors After Updating WhatsApp
WhatsApp web released an update last night that caused this issue but I immediately addressed it and...
11
discord.js V12 Master Receiver not Decoding Opus
I figured it out! For the latest master: In src/client/voice/receiver/PacketHandler.js at L66 Replac...
11
node telegram bot api how to know if bot is blocked by user (catch 403 forbbidden)?
@GochoMugo > What semantically-correct way do you recommend in place of exceptions? Well in golang t...
10
InstaPy Install InstaPy on a Raspberry
finally made it!! i reversed the tutorial https://github.com/timgrossmann/InstaPy/blob/master/docs/H...
9
InstaPy Definetly not working on Raspberry Pi (3B+) - *Updated Instructions*
clean reinstall of raspbian on a rp3+ sudo apt-get update sudo apt-get upgrade pip3 install instapy ...
8
botframework sdk BotConnector to reset a session
@wiltodelta skype and slack eating / command as their commands Is there a way I can make BotConnecto...
7
InstaPy cant get user followers
In unfollow_util.py Temporary replace with IT WORKS! Use this temporarily while wait for the officia...
7
InstaPy TypeError: window.insta_data is undefined
Today Bot start w/o any problem after some likes action the session end with this report: On the gec...
7
InstaPy Hide Selenium Extension: Error
Okay: I digged into it a little bit The problem seems to be with the arrive function within the fire...
6
InstaPy [FIX]IG Change Login Class Element - Cannot Creating Cookies or New Login Issue When Deleting Cookies
Please read New update : https://github.com/timgrossmann/InstaPy/issues/2133#issuecomment-394098747 ...
6
whatsapp web.js UnhandledPromiseRejectionWarning: Error: Evaluation failed: ReferenceError: webpackChunkbuild is not defined at fillModuleArray
just temporary solution try replace webpackChunkbuild with webpackChunkwhatsapp_web_client on node_m...
5
InstaPy Unfollow loop error: Message: unknown error: Cannot read property 'activity_counts' of undefined
Alright @tompicca Do this modification to get a total solution INFO [2018-08-19 11:27:42] [xxx] --> ...
5
InstaPy Follow likers function can't fetch likers properly
Hi @opexa I saw your problem while reading @timgrossmann's thread Getting likers from user: targetus...
5
openkore Disconnected from server.
I've got the solution! Simply remove the line 0362 0367 in tables/iRO/Restart/shuffle.txt on the end...
5
botframework sdk Conversation.SendAsync Authentication using custom multi-tenant authentication (Bot Builder 3.5.2)
similar to #2214 I am in the process of creating several different bots that will tie into Facebook ...
5
botframework sdk [Question] Parsing image attachment through skype
The Skype attachment URLs are secured by JwtToken A question I had was about how to handle when a us...
5
igbot [BUG] upload photos - Not yet logged in starting: PRE-LOGIN FLOW!
Not working for myself sorry I tried many things but didn't manage to make it works I tried on Fedor...
4
PokemonGo Bot Bot only moves and doing nothing after some time
There seems to be something crashing which creates this ... Expected Behavior Bot collects Pokemon a...