Skip to content

cannot reuse already awaited aclose()/athrow() #3003

@alinemone

Description

@alinemone

On Windows systems, when I use this method

async def get_api(cls):
a = await httpx.AsyncClient().get('https://api.publicapis.org/entries')
I get the following error

"type": "RuntimeError",
"message": "cannot reuse already awaited aclose()/athrow()",
"trace": [
    {
        "file": "E:\\Programs\\order\\venv\\lib\\site-packages\\httpx\\_client.py",
        "name": "_send_handling_auth",
        "line number": 1662,
        "line": "await auth_flow.aclose()"
    },

I commented line 1662 in the _client.py file
await auth_flow.aclose()

and the problem was solved, but I don't know if others have encountered the problem. This part has a problem on Windows

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