Skip to content

Bug in flags2_asyncio.py (and flags3_asyncio.py) reporting #32

Open
@jgc31

Description

@jgc31

First, let me thank you very much for this great book! Fluent Python is very pedagogical, informative and quite a pleasure to read.

So, I have been quite surprised to encounter a bug when running flags2_asyncio.py, in the error accounting in the supervisor function. After a first error happens, all downloads are counted as erroneous, even when they are in fact successful. This is because the "error" variable is never reset after entering the for loop.
This can be fixed simply by adding "else: error = None" at the end of the try/except (parallel to what you do in flags2_threadpool.py and flags2_asyncio_executor.py).

This bug is also present in flags3_asyncio.py.

(I am using Python3.10.)

A big thank you again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions