-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ProactorEventLoop on Windows #36
Comments
I'm sorry but latest |
You're right, for whatever reason I was running it in a machine with aiohttp 1.0.whatever. I still think this problem can be reproduced in the last version, I'll try later. |
Async DNS resolver was disabled by default in aiohttp 1.1: aio-libs/aiohttp#559 It is not 100% compatible with standard threading one. To reproduce the functionality in newer versions explicitly install async resolver: https://docs.aiohttp.org/en/stable/client.html#resolving-using-custom-nameservers |
Code:
From the original code I added a proper user agent, the implementation of Async resolver is basically a copy-paste of the documentation. Got error:
Edit: From the original coded I also implemented the session inside the coroutine. |
@asvetlov If I try to input a lot of urls, I aslo get another error:
Error:
I'm well aware this is a separate error that should be discussed elsewhere because it's not in the scope of aiodns, I'm just pointing it out here in case both errors are on my end and are somehow (although unlikely) correlated |
The API c-ares provides deals with low level fds, which is what aiodns in turn uses to function. If a given event loop implementation doesn't support those methods then aiodns cannot work. |
Hi,
I've had a few problems trying to implement asyncio and aiohttp into my script running out of sockets to perform the connection in SelectorEventLoop. I've then tried to use ProactorEventLoop on Windows that doesn't seem to not have this limitation. However when I try:
Note the use of semaphore and chuncking to try to get around the selector limit issue that I face if I replace
with:
loop = asyncio.get_event_loop()
With the current configuratioon it raises:
Note my direction path has been manually changed to USER
Python documentation says: https://docs.python.org/3/library/asyncio-eventloops.html#asyncio.ProactorEventLoop
add_reader() and add_writer() only accept file descriptors of sockets
Is aiodns not supported with ProactorEventLoop? Is this some type of weird bug? Is aiodns fully supported on Windows?
I can provide more info, but in case you need a little bit more background I've been derived here by @asvetlov in the following stack overflow question: https://stackoverflow.com/questions/47675410/python-asyncio-aiohttp-valueerror-too-many-file-descriptors-in-select-on-win
The text was updated successfully, but these errors were encountered: