Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

ValueError: charset must not be in content_type argument #17

Open
RomanPerekhrest opened this issue Nov 27, 2017 · 0 comments
Open

ValueError: charset must not be in content_type argument #17

RomanPerekhrest opened this issue Nov 27, 2017 · 0 comments

Comments

@RomanPerekhrest
Copy link

RomanPerekhrest commented Nov 27, 2017

When running http server given by example-code/18-asyncio/charfinder/http_charfinder.py the error is thrown:
Error handling request Traceback (most recent call last): File "/home/osboxes/.local/lib/python3.5/site-packages/aiohttp/web_protocol.py", line 416, in start resp = yield from self._request_handler(request) File "/home/osboxes/.local/lib/python3.5/site-packages/aiohttp/web.py", line 323, in _handle resp = yield from handler(request) File "/home/osboxes/.local/lib/python3.5/site-packages/aiohttp/web_urldispatcher.py", line 139, in handler_wrapper result = old_handler(*args, **kwargs) File "http_charfinder.py", line 43, in home return web.Response(content_type=CONTENT_TYPE, text=html) File "/home/osboxes/.local/lib/python3.5/site-packages/aiohttp/web_response.py", line 458, in __init__ raise ValueError("charset must not be in content_type " ValueError: charset must not be in content_type argument

My Env: Python 3.5, aiohttp 2.3.2

Removing charset=UTF-8 param from CONTENT_TYPE constant solves the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant