mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
ollama.generate(model='deepseek-r1:1.5b',prompt='hello') error #216
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @HZPHuangZePeng on GitHub (Feb 7, 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 2, in
ollama.generate(model='deepseek-r1:1.5b',prompt='hello')
File "D:\Python310\lib\site-packages\ollama_client.py", line 242, in generate
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
@ParthSareen commented on GitHub (Feb 10, 2025):
Can you please provide library verision, ollama version, and Ollama server logs?