Python "AttributeError: module 'httpcore' has no attribute 'Request'" hatası

iEndere

Picopat
Katılım
20 Temmuz 2023
Mesajlar
101
Çözümler
1
Yer
İstanbul
Daha fazla  
Cinsiyet
Erkek
Python:
import httpx
  File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx\__init__.py", line 48, in <module>
    from ._main import main
  File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx\_main.py", line 111, in <module>
    def format_request_headers(request: httpcore.Request, http2: bool = False) -> str:
AttributeError: module 'httpcore' has no attribute 'Request'

Yukarıdaki hatayı Python kodumda nasıl düzeltebilirim?
 
Python:
import httpx.
 File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx\__init__.py", line 48, in <module>
 from ._main import main.
 File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx\_main.py", line 111, in <module>
 def format_request_headers(request: httpcore.Request, http2: bool = False) -> str:
AttributeError: module 'httpcore' has no attribute 'Request'

Yukarıdaki hatayı Python kodumda nasıl düzeltebilirim?

Bu tür hatalar genellikle kütüphanelerin uyumsuz sürümlerinden kaynaklanır. Httpcore kütüphanesinde request sınıfının olmadığı yazıyor. Bu durumda, httpx kütüphanesinin doğru sürümünü ve uyumlu httpcore sürümünü yüklemek genellikle sorunu çözer.
 

Technopat Haberler

Geri
Yukarı