Skip to content

CurlImpersonateHttpClient warning on Windows #495

Closed

Description

@janbuchar

Using the CurlImpersonateHttpClient adds this warning message upon program start, which doesn't seem to be fixed if I add in the command that it asks for

    asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())
    await crawler.run(["https://www.mtggoldfish.com/metagame/modern#paper"])
.venv\Lib\site-packages\curl_cffi\aio.py:137: RuntimeWarning:
    Proactor event loop does not implement add_reader family of methods required.
    Registering an additional selector thread for add_reader support.
    To avoid this warning use:
        asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())

Originally posted by @MrTyton in #486 (comment)

Activity

  1. added
    t-toolingIssues with this label are in the ownership of the tooling team.
    on Sep 3, 2024
  2. self-assigned this
    on Nov 4, 2024
  3. janbuchar commented on Dec 2, 2024

    @janbuchar
    CollaboratorAuthor

    @MrTyton Looks like you have to add asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy()) before asyncio.run(), i.e., before your event loop is created.

  4. vdusek commented on Dec 2, 2024

    @vdusek
    Collaborator

    I believe we should document this somewhere, follow-up issue is ok

  5. janbuchar commented on Dec 2, 2024

    @janbuchar
    CollaboratorAuthor

    I believe we should document this somewhere, follow-up issue is ok

    I'm not so sure about that, it's a limitation of a package that we integrate with and the warning tells you what to do pretty well. Maybe we can add a line about this into the docblock of CurlImpersonateHttpClient.

  6. added 2 commits that reference this issue on Dec 3, 2024
    367899c
    a217258
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working.t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions