Attempt to decode JSON with unexpected mimetype: text/html
See original GitHub issueRasa version:
rasa --version Rasa 1.0.0
Rasa X version (if used & relevant):
rasa/rasa-x:stable
from docker
Python version: python3 --version Python 3.6.8
Operating system (windows, osx, …):
Linux 7e5eb7ff3f80 4.4.0-1083-aws #93-Ubuntu SMP Wed May 8 16:08:41 UTC 2019 x86_64 GNU/Linux
Issue:
- Run rasa-x, login
- select an model that has already been trained
- click “talk to your bot” and enter text
ERROR: nothing happens. Log of production container shows the following:
$ docker logs -f rasa_rasa-production_1
[...]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/sanic/app.py", line 917, in handle_request
response = await response
File "/usr/local/lib/python3.6/site-packages/rasa/core/channels/channel.py", line 430, in receive
sender_id = await self._extract_sender(request)
File "/usr/local/lib/python3.6/site-packages/rasa/core/channels/rasa_chat.py", line 50, in _extract_sender
user = await self._check_token(req.headers.get("Authorization"))
File "/usr/local/lib/python3.6/site-packages/rasa/core/channels/rasa_chat.py", line 38, in _check_token
return await resp.json()
File "/usr/local/lib/python3.6/site-packages/aiohttp/client_reqrep.py", line 1027, in json
headers=self.headers)
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html'
Is this a known issue? This is using the following versions of aiohttp
$ pip3 list | grep aio
aiofiles 0.4.0
aiohttp 3.5.4
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Python - Attempt to decode JSON with unexpected mimetype
Pass expected content type to json() method: data = await resp.json(content_type='text/html'). or disable the check entirely:
Read more >Attempt to decode JSON with unexpected mimetype: text/html ...
The server is obviously incorrect, as the error says it is sending a content-type of text/html. You can customise the check with content_type...
Read more >0, message='Attempt to decode JSON with unexpected ...
Hi all, I am getting the above-mentioned error when try CallbackInput method. Rasa version is : Rasa 1.0.6 Here is my code, credentials.yml ......
Read more >aio-libs/Lobby - Gitter
I have this error where this json on the web is like ... ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; ......
Read more >Google Home Error log "Attempt to decode JSON with ...
I have a dozen of these error logs all of a sudden, i think after latest update 2019-06-28 16:35:28 ERROR (MainThread) [googledevices] ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ddombrowsky It’s probably due to a wrong entry in
credentials.yml
- this will be fixed in the next release. in the meantime, can you change the contents of the/etc/rasa/credentials.yml
toand try again?
i’m gonna close this issue now, a fix will be part of an upcoming release