httpx.ConnectError: All connection attempts failed #2275
Replies: 6 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? |
|
Just made some tests. I meet the same problem when sharing Before: After: |
|
So httpx is not coroutine-safe? |
|
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: |
|
For us, it was a missing env. |
|
fking stupid lib |
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,
All reactions