httpx.ConnectError: All connection attempts failed #2275
Replies: 4 comments 8 replies
-
So, it couldn't connect. Although the error messaging obviously isn't very helpful for you in determining why. Take things step by step. First, simplify it right down... import httpx
httpx.get(url) # What does this result in? Try a different library... import requests
requests.get(url) # How about now? Try a different tool entirely... Try a different library... $ curl <url> # This? Also, is this a public URL that you can share, so others can help you more easily? |
Beta Was this translation helpful? Give feedback.
-
Just made some tests. I meet the same problem when sharing Before:
After:
|
Beta Was this translation helpful? Give feedback.
-
So httpx is not coroutine-safe? |
Beta Was this translation helpful? Give feedback.
-
Same as @akdev-tech , I meet the same error when getting stream response with one global httpx.AsyncClient instance: client = httpx.AsyncClient()
async def request():
response = await self.client.send(req, stream=True) But the error is not raised offen(about 1~2% per day), so I am not sure whether it's a server-side problem or a client-side problem. Full traceback below:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear all, I hope I find you good.
I'm facing a weird issue with the AsyncClient:
Platform
version
Code
Traceback
Best Regards,
Beta Was this translation helpful? Give feedback.
All reactions