Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sanic 19.12.0 breaks rest api #5021

Closed
utterworks opened this issue Dec 28, 2019 · 3 comments
Closed

sanic 19.12.0 breaks rest api #5021

utterworks opened this issue Dec 28, 2019 · 3 comments
Labels
resolution:duplicate Final state. Issue can be closed, duplicate should be referenced type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@utterworks
Copy link

Rasa version: Rasa 1.6.0a1

Rasa SDK version (if used & relevant):

Rasa X version (if used & relevant):

Python version: 3.6

Operating system (windows, osx, ...): ubuntu

Issue:

The latest version of Sanic v19.12.0 has introduced breaking changes and has broken the rest input channel. Please change the dependency for sanic back to 19.9.0.

Error (including full traceback):

[2019-12-28 17:06:22 +0000] [1] [ERROR] Exception occurred while handling uri: 'http://ec2-xx.xx.xx.xx.eu-west-1.compute.amazonaws.com:5005/domain'
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/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'

Command or request that led to error:

/domain http request

Content of configuration file (config.yml) (if relevant):

Content of domain file (domain.yml) (if relevant):

@utterworks utterworks added the type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. label Dec 28, 2019
@utterworks utterworks changed the title sanic 19.12.0 is breaking rest api sanic 19.12.0 breaks rest api Dec 28, 2019
@Naktibalda
Copy link

I got the same error by following Rasa Tutorial.

$ rasa shell
2019-12-29 12:32:15 INFO     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.
2019-12-29 12:32:15 INFO     root  - Starting Rasa server on http://localhost:5005
2019-12-29 12:32:32 INFO     absl  - Entry Point [tensor2tensor.envs.tic_tac_toe_env:TicTacToeEnv] registered with id [T2TEnv-TicTacToeEnv-v0]
2019-12-29 12:32:33.880236: 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 ->  hi
Exception occurred while handling uri: 'http://localhost:5005/webhooks/rest/webhook?stream=true&token='
Traceback (most recent call last):
  File "/home/gintas/venv/lib/python3.6/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 "/home/gintas/venv/lib/python3.6/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-29 12:32:42 ERROR    asyncio  - Task exception was never retrieved
future: <Task finished coro=<configure_app.<locals>.run_cmdline_io() done, defined at /home/gintas/venv/lib/python3.6/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.6 aiohttp/3.6.2', 'Content-Length': '38', '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 "/home/gintas/venv/lib/python3.6/site-packages/rasa/core/run.py", line 128, in run_cmdline_io
    server_url=constants.DEFAULT_SERVER_FORMAT.format("http", port)
  File "/home/gintas/venv/lib/python3.6/site-packages/rasa/core/channels/console.py", line 140, in record_messages
    async for response in bot_responses:
  File "/home/gintas/venv/lib/python3.6/site-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 "/home/gintas/venv/lib/python3.6/site-packages/aiohttp/client.py", line 1012, in __aenter__
    self._resp = await self._coro
  File "/home/gintas/venv/lib/python3.6/site-packages/aiohttp/client.py", line 588, in _request
    resp.raise_for_status()
  File "/home/gintas/venv/lib/python3.6/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=')

Rasa version: Rasa 1.6.0

@Naktibalda
Copy link

Duplicate of #5019

@sara-tagger
Copy link
Collaborator

Thanks for the issue, @Ghostvv will get back to you about it soon!

You may find help in the docs and the forum, too 🤗

@erohmensing erohmensing added the resolution:duplicate Final state. Issue can be closed, duplicate should be referenced label Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:duplicate Final state. Issue can be closed, duplicate should be referenced type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

3 participants