You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a request response is a redirect but location has an invalid url, a ValueError is raised.
Expected behaviour
raise a ClientError or some more specific error.
Actual behaviour
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/usr/lib/python3.6/asyncio/base_events.py", line 449, in run_until_complete
return future.result()
File "/usr/lib/python3.6/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "<stdin>", line 4, in process
File "/myenv/lib/python3.6/site-packages/aiohttp/client.py", line 604, in __aenter__
self._resp = yield from self._coro
File "/myenv/lib/python3.6/site-packages/aiohttp/client.py", line 228, in _request
session=self, auto_decompress=self._auto_decompress)
File "/myenv/lib/python3.6/site-packages/aiohttp/client_reqrep.py", line 97, in __init__
self.update_host(url)
File "/myenv/lib/python3.6/site-packages/aiohttp/client_reqrep.py", line 126, in update_host
"Could not parse hostname from URL '{}'".format(url))
ValueError: Could not parse hostname from URL 'http://'
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new
Long story short
When a request response is a redirect but location has an invalid url, a ValueError is raised.
Expected behaviour
raise a ClientError or some more specific error.
Actual behaviour
Steps to reproduce
Your environment
Python 3.6.0b2
Ubuntu 16.10
aiohttp==2.2,5
Also happens with aiohttp==2.3.0a0 (installed from git on 04/Sep/2017)
The text was updated successfully, but these errors were encountered: