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

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

@cdm-work

Description

@cdm-work

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions