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

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 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 join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.