Rasa вылетает при отправке сообщения

Я установил Rasa без ошибок. Когда я запускаю оболочку rasa, сервер запускается, и мне предоставляется приглашение чат-бота. когда я ввожу привет, я получаю следующую ошибку:

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 "g:\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 "g:\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'
2020-01-04 11:29:30 ERROR    asyncio  - Task exception was never retrieved
future: <Task finished coro=<configure_app.<locals>.run_cmdline_io() done, defined at g:\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': '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 "g:\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 "g:\programs\python\python37\lib\site-packages\rasa\core\channels\console.py", line 140, in record_messages
    async for response in bot_responses:
  File "g:\programs\python\python37\lib\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 "g:\programs\python\python37\lib\site-packages\aiohttp\client.py", line 1012, in __aenter__
    self._resp = await self._coro
  File "g:\programs\python\python37\lib\site-packages\aiohttp\client.py", line 588, in _request
    resp.raise_for_status()
  File "g:\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=')

У меня не было проблем с установкой, так как я новичок в Rasa, я не уверен, в чем проблема.

Пожалуйста, порекомендуйте. Спасибо


person Amin Baig    schedule 04.01.2020    source источник


Ответы (1)


Проверьте свою версию sanic, возможно, она не соответствует требованиям. Должно быть 19.9.0

Запустите это, чтобы установить нужную версию:

pip install sanic == 19.9.0

person Victor Vasiliev    schedule 06.01.2020