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

17-futures/countries/flags_asyncio.py fails to download flags #25

Open
cdm-work opened this issue Sep 13, 2018 · 1 comment
Open

17-futures/countries/flags_asyncio.py fails to download flags #25

cdm-work opened this issue Sep 13, 2018 · 1 comment

Comments

@cdm-work
Copy link

@cdm-work cdm-work commented Sep 13, 2018

When running with python 3.6.6, with aiohttp 3.3.2, the 'flags_asyncio.py' script outputs 20 pairs of lines similar to this:
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x10ecbfd68>
followed by 20 tracebacks similar to this:
Task exception was never retrieved
future: <Task finished coro=<download_one() done, defined at flags_asyncio.py:28> exception=TypeError("'_SessionRequestContextManager' object is not iterable",)>
Traceback (most recent call last):
File "flags_asyncio.py", line 30, in download_one
image = yield from get_flag(cc) # <7>
File "flags_asyncio.py", line 23, in get_flag
resp = yield from aiohttp.request('GET', url) # <4>
TypeError: '_SessionRequestContextManager' object is not iterable

cdm-work added a commit to cdm-work/example-code that referenced this issue Sep 20, 2018
The changes to 17-futures/countries/flags_asyncio.py allow it to work
with Python 3.6.6 and aiohttp 3.4.4.
@cdm-work
Copy link
Author

@cdm-work cdm-work commented Sep 20, 2018

Pull request #26 would address this issue. Obviously it would be out of sync with the book contents, but it would actually work and produce a positive result.

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.