Internal Server Error


Exception occurred while handling uri: ‘http://localhost:5005/webhooks/rest/webhook?stream=true&token=’ Traceback (most recent call last): File “c:\users\saprepc\appdata\local\programs\python\python37\lib\site-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 “c:\users\saprepc\appdata\local\programs\python\python37\lib\site-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-30 18:04:32 ERROR asyncio - Task exception was never retrieved future: <Task finished coro=<configure_app..run_cmdline_io() done, defined at c:\users\saprepc\appdata\local\programs\python\python37\lib\site-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.7 aiohttp/3.6.2’, ‘Content-Length’: ‘39’, ‘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 “c:\users\saprepc\appdata\local\programs\python\python37\lib\site-packages\rasa\core\run.py”, line 128, in run_cmdline_io server_url=constants.DEFAULT_SERVER_FORMAT.format(“http”, port) File “c:\users\saprepc\appdata\local\programs\python\python37\lib\site-packages\rasa\core\channels\console.py”, line 135, in record_messages async for response in bot_responses: File “c:\users\saprepc\appdata\local\programs\python\python37\lib\site-packages\rasa\core\channels\console.py”, line 99, in send_message_receive_stream async with session.post(url, json=payload, raise_for_status=True) as resp: File “c:\users\saprepc\appdata\local\programs\python\python37\lib\site-packages\aiohttp\client.py”, line 1012, in aenter self._resp = await self._coro File “c:\users\saprepc\appdata\local\programs\python\python37\lib\site-packages\aiohttp\client.py”, line 588, in _request resp.raise_for_status() File “c:\users\saprepc\appdata\local\programs\python\python37\lib\site-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=’)

This error occurs after I run “rasa shell”. This post is connected to “__run_response_middleware() error”. The errors from the aforementioned post are present alongwith the errors posted here.

If needed, check out my “actions.py” file from the above post. This file is the default action file created by “rasa init”.


Do you have request_name anywhere in your custom code anywhere? Have you tried doing a rasa init and setting up a new project and ensuring this works first?

No, i do not not have “request_name” anywhere in my code. I tried this with a new project by rasa init but it also returns the same error.

Yea I’m seeing it as well, might be a issue on our end, let me look into it.

Looks like someone already filled a issue as well under Rasa Shell error following tutorial · Issue #5019 · RasaHQ/rasa · GitHub

Thanks @btotharye, I checked out that issue and it seems to be working for me too by installing sanic==19.9.0.

3 Likes