-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
CurlAsyncHTTPClient hangs #3175
Comments
Your code looks fine to me. It's not quite the same behavior but I wonder if this could be related to #3131 (different versions of everything, though). Try enabling asyncio's debug mode and setting the logging level to debug to see more about what's going on. |
G'day - I came up against the same problem. It had me stumped, because I could run the sample code for the e web-spider example in https://buildmedia.readthedocs.org/media/pdf/tornado/latest/tornado.pdf with no issues. What I found was that when I pre-instantiated the AsyncHTTPClient, the fetch failed, but when I instantiated it on the fly, it worked. The modified version of @saltedsword's code that now works is as follows:
It looks to me like the instantiation only works when there is an open, running IOloop, i.e. if it happens inside a running coroutine. |
It hangs when executing method
fetch
with CurlAsyncHTTPClient. I tried working on CentOS, Python 3.7 ~ 3.9, but the behavior was the same.However, when i use SimpleAsyncHTTPClient, it works fine.
Software environment:
Here is my test code:
I wonder if my code is wrong, since no one mentioned the same issue.
The text was updated successfully, but these errors were encountered: