httpcore.RemoteProtocolError: Server disconnected without sending a response. The above exception was the direct cause of the following exception: #214

Closed
opened 2026-02-15 16:28:48 -05:00 by yindo · 1 comment
Owner

Originally created by @HZPHuangZePeng on GitHub (Feb 6, 2025).

D:\Python310\python.exe D:\python-personal\lintcode\0206.py
Traceback (most recent call last):
File "D:\Python310\lib\site-packages\httpx_transports\default.py", line 101, in map_httpcore_exceptions
yield
File "D:\Python310\lib\site-packages\httpx_transports\default.py", line 250, in handle_request
resp = self._pool.handle_request(req)
File "D:\Python310\lib\site-packages\httpcore_sync\connection_pool.py", line 216, in handle_request
raise exc from None
File "D:\Python310\lib\site-packages\httpcore_sync\connection_pool.py", line 196, in handle_request
response = connection.handle_request(
File "D:\Python310\lib\site-packages\httpcore_sync\http_proxy.py", line 207, in handle_request
return self._connection.handle_request(proxy_request)
File "D:\Python310\lib\site-packages\httpcore_sync\connection.py", line 101, in handle_request
return self._connection.handle_request(request)
File "D:\Python310\lib\site-packages\httpcore_sync\http11.py", line 143, in handle_request
raise exc
File "D:\Python310\lib\site-packages\httpcore_sync\http11.py", line 113, in handle_request
) = self._receive_response_headers(**kwargs)
File "D:\Python310\lib\site-packages\httpcore_sync\http11.py", line 186, in _receive_response_headers
event = self._receive_event(timeout=timeout)
File "D:\Python310\lib\site-packages\httpcore_sync\http11.py", line 238, in _receive_event
raise RemoteProtocolError(msg)
httpcore.RemoteProtocolError: Server disconnected without sending a response.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\python-personal\lintcode\0206.py", line 4, in
response: ChatResponse = chat(model='deepseek-r1:1.5b', messages=[
File "D:\Python310\lib\site-packages\ollama_client.py", line 333, in chat
return self._request(
File "D:\Python310\lib\site-packages\ollama_client.py", line 178, in _request
return cls(**self._request_raw(*args, **kwargs).json())
File "D:\Python310\lib\site-packages\ollama_client.py", line 118, in _request_raw
r = self._client.request(*args, **kwargs)
File "D:\Python310\lib\site-packages\httpx_client.py", line 825, in request
return self.send(request, auth=auth, follow_redirects=follow_redirects)
File "D:\Python310\lib\site-packages\httpx_client.py", line 914, in send
response = self._send_handling_auth(
File "D:\Python310\lib\site-packages\httpx_client.py", line 942, in _send_handling_auth
response = self._send_handling_redirects(
File "D:\Python310\lib\site-packages\httpx_client.py", line 979, in _send_handling_redirects
response = self._send_single_request(request)
File "D:\Python310\lib\site-packages\httpx_client.py", line 1014, in _send_single_request
response = transport.handle_request(request)
File "D:\Python310\lib\site-packages\httpx_transports\default.py", line 249, in handle_request
with map_httpcore_exceptions():
File "D:\Python310\lib\contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "D:\Python310\lib\site-packages\httpx_transports\default.py", line 118, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.RemoteProtocolError: Server disconnected without sending a response.

Process finished with exit code 1

Originally created by @HZPHuangZePeng on GitHub (Feb 6, 2025). D:\Python310\python.exe D:\python-personal\lintcode\0206.py Traceback (most recent call last): File "D:\Python310\lib\site-packages\httpx\_transports\default.py", line 101, in map_httpcore_exceptions yield File "D:\Python310\lib\site-packages\httpx\_transports\default.py", line 250, in handle_request resp = self._pool.handle_request(req) File "D:\Python310\lib\site-packages\httpcore\_sync\connection_pool.py", line 216, in handle_request raise exc from None File "D:\Python310\lib\site-packages\httpcore\_sync\connection_pool.py", line 196, in handle_request response = connection.handle_request( File "D:\Python310\lib\site-packages\httpcore\_sync\http_proxy.py", line 207, in handle_request return self._connection.handle_request(proxy_request) File "D:\Python310\lib\site-packages\httpcore\_sync\connection.py", line 101, in handle_request return self._connection.handle_request(request) File "D:\Python310\lib\site-packages\httpcore\_sync\http11.py", line 143, in handle_request raise exc File "D:\Python310\lib\site-packages\httpcore\_sync\http11.py", line 113, in handle_request ) = self._receive_response_headers(**kwargs) File "D:\Python310\lib\site-packages\httpcore\_sync\http11.py", line 186, in _receive_response_headers event = self._receive_event(timeout=timeout) File "D:\Python310\lib\site-packages\httpcore\_sync\http11.py", line 238, in _receive_event raise RemoteProtocolError(msg) httpcore.RemoteProtocolError: Server disconnected without sending a response. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "D:\python-personal\lintcode\0206.py", line 4, in <module> response: ChatResponse = chat(model='deepseek-r1:1.5b', messages=[ File "D:\Python310\lib\site-packages\ollama\_client.py", line 333, in chat return self._request( File "D:\Python310\lib\site-packages\ollama\_client.py", line 178, in _request return cls(**self._request_raw(*args, **kwargs).json()) File "D:\Python310\lib\site-packages\ollama\_client.py", line 118, in _request_raw r = self._client.request(*args, **kwargs) File "D:\Python310\lib\site-packages\httpx\_client.py", line 825, in request return self.send(request, auth=auth, follow_redirects=follow_redirects) File "D:\Python310\lib\site-packages\httpx\_client.py", line 914, in send response = self._send_handling_auth( File "D:\Python310\lib\site-packages\httpx\_client.py", line 942, in _send_handling_auth response = self._send_handling_redirects( File "D:\Python310\lib\site-packages\httpx\_client.py", line 979, in _send_handling_redirects response = self._send_single_request(request) File "D:\Python310\lib\site-packages\httpx\_client.py", line 1014, in _send_single_request response = transport.handle_request(request) File "D:\Python310\lib\site-packages\httpx\_transports\default.py", line 249, in handle_request with map_httpcore_exceptions(): File "D:\Python310\lib\contextlib.py", line 153, in __exit__ self.gen.throw(typ, value, traceback) File "D:\Python310\lib\site-packages\httpx\_transports\default.py", line 118, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.RemoteProtocolError: Server disconnected without sending a response. Process finished with exit code 1
yindo closed this issue 2026-02-15 16:28:48 -05:00
Author
Owner

@ParthSareen commented on GitHub (Feb 10, 2025):

Going to close this as #438 is the same

@ParthSareen commented on GitHub (Feb 10, 2025): Going to close this as #438 is the same
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#214