httpx.ConnectError: EOF occurred in violation of protocol (_ssl.c:1131)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Tranquilo
- Stack tecnológico
- python
- Área
- api, networking
Línea de trabajo
Comienza desde el punto de entrada httpx.get y sigue el recorrido indicado a través de la conexión síncrona, el proxy y la gestión de TLS de httpcore. Reproduce la solicitud con la configuración mostrada de Python 3.8 y httpx 0.24.1, y determina después si el fallo se puede reproducir en el proyecto en lugar de ser específico del entorno. Para darlo por terminado se requeriría una causa confirmada y una prueba o una resolución documentada, pero el issue actualmente no define ninguna de las dos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Originally opened by
@jekoieon 2023-07-22 09:47:26 in encode/httpx
I try to use bellow code run httpx, but it run as error?
import httpx
r = httpx.get('https://httpbin.org/get')
print(r)
** The Error**
PS E:\test> & C:/Users/jekoi/AppData/Local/Programs/Python/Python38/python.exe e:/test/t6.py
Traceback (most recent call last):
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpcore\_exceptions.py", line 10, in map_exceptions
yield
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpcore\_backends\sync.py", line 62, in start_tls
raise exc
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpcore\_backends\sync.py", line 57, in start_tls
sock = ssl_context.wrap_socket(
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1040, in _create
self.do_handshake()
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1131)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpx\_transports\default.py", line 60, in map_httpcore_exceptions
yield
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpx\_transports\default.py", line 218, in handle_request
resp = self._pool.handle_request(req)
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpcore\_sync\connection_pool.py", line 262, in handle_request
raise exc
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpcore\_sync\connection_pool.py", line 245, in handle_request
response = connection.handle_request(request)
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpcore\_sync\http_proxy.py", line 271, in handle_request
connect_response = self._connection.handle_request(
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpcore\_sync\connection.py", line 92, in handle_request
raise exc
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpcore\_sync\connection.py", line 69, in handle_request
stream = self._connect(request)
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpcore\_sync\connection.py", line 149, in _connect
stream = stream.start_tls(**kwargs)
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpcore\_backends\sync.py", line 62, in start_tls
raise exc
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpcore\_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ConnectError: EOF occurred in violation of protocol (_ssl.c:1131)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "e:/test/t6.py", line 3, in <module>
r = httpx.get('https://httpbin.org/get')
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpx\_api.py", line 189, in get
return request(
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpx\_client.py", line 814, in request
return self.send(request, auth=auth, follow_redirects=follow_redirects)
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpx\_client.py", line 901, in send
response = self._send_handling_auth(
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpx\_client.py", line 929, in _send_handling_auth
response = self._send_handling_redirects(
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpx\_client.py", line 966, in _send_handling_redirects
response = self._send_single_request(request)
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpx\_client.py", line 1002, in _send_single_request
response = transport.handle_request(request)
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpx\_transports\default.py", line 218, in handle_request
resp = self._pool.handle_request(req)
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Users\jekoi\AppData\Local\Programs\Python\Python38\lib\site-packages\httpx\_transports\default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError: EOF occurred in violation of protocol (_ssl.c:1131)
PS E:\test>
PS E:\test> pip show httpx
Name: httpx
Version: 0.24.1
Summary: The next generation HTTP client.
Home-page:
Author:
Author-email: Tom Christie <[email protected]>
License:
Location: c:\users\jekoi\appdata\local\programs\python\python38\lib\site-packages
Requires: certifi, httpcore, idna, sniffio
Required-by:
PS E:\test>
- Lenguaje dominante
- Python
- Estrellas
- 1.6k
- Forks
- 103
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 25
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de pydantic/httpx2
-
Please revert aiter_bytes signature to AsyncIteratorQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pydantic/httpx2#1158 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Export AutoBackendQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
pydantic/httpx2#1131 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Mention header name error message for invalid header encodingsQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pydantic/httpx2#864 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Support DigestAuth with "x-www-authenticate" in first response headerPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
Todos los issues de pydantic/httpx2
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
OCA/account-invoicing#2529 ·
Los mantenedores suelen responder en 1 día
-
area/ci
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
ImageGen generate-batch aborts valid JSONL jobs containing a Unicode line separator in poster textAbiertobug imagen skills
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Email validation accepts a trailing newlinePosiblemente ocupada @marcello-pichini la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día