Takaso2
Takaso2

Reputation: 57

httpx - module 'httpcore' has no attribute 'TimeoutException'

whenever I import the module "httpx", for example in this code:

import httpx

input()

I get this error:

module 'httpcore' has no attribute 'TimeoutException'
  line 1, in <module>
    import httpx

Upvotes: 0

Views: 9277

Answers (3)

Tor
Tor

Reputation: 36

You might need to stick with an older version of httpx for now, try version 19

pip install httpx==0.19.0

Upvotes: 1

Takaso2
Takaso2

Reputation: 57

Ok, I finally solved the error after 1 month, all you got to do is:

pip uninstall httpcore

then

pip install httpcore[http2]

Upvotes: 0

0xApollyon
0xApollyon

Reputation: 80

What version of pip are you using ? Try updating pip and reinstalling the package Or you can try installing the pre 10 release using $ pip install httpx --pre as stated in the httpx docs https://www.python-httpx.org/

Upvotes: 1

Related Questions