question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rasa Shell error following tutorial

See original GitHub issue

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.<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=’)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

30reactions
jxf1002commented, Jan 4, 2020

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

4reactions
erohmensingcommented, Jan 2, 2020

Oh, weird 🤔 perfect, we’ll pinn 19.9.0, thanks for the help 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rasa Shell error following tutorial · Issue #5019 - GitHub
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' ...
Read more >
RASA shell results in error in ANACONDA ENV
Hello I have created separate env on ANACONDA specific to run RASA projects. I am able to successfully follow the instructions as per ......
Read more >
THE RASA MASTERCLASS HANDBOOK - HubSpot
Test the newly trained model by running the Rasa CLI command, rasa shell nlu . ... At the end of this tutorial, we...
Read more >
Newest 'rasa' Questions - Stack Overflow
Hi guys I have recently installed rasa stack and created a rasa stack project but when I run rasa shell this error comes...
Read more >
Create Chatbot using Rasa Part-1 - Towards Data Science
Rasa is an open source machine learning framework for building AI assistants and chatbots. Mostly you don't need any programming language experience to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found