You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
.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())
@MrTyton Looks like you have to add asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy()) before asyncio.run(), i.e., before your event loop is created.
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.
Activity
janbuchar commentedon Dec 2, 2024
@MrTyton Looks like you have to add
asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())beforeasyncio.run(), i.e., before your event loop is created.vdusek commentedon Dec 2, 2024
I believe we should document this somewhere, follow-up issue is ok
janbuchar commentedon Dec 2, 2024
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.feat: Improve project bootstrapping (apify#538)
feat: Improve project bootstrapping (apify#538)