There is a compatibility issue between https_proxy and http2 #2954
Unanswered
hunter001325
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've identified a compatibility issue between https_proxy and http2 in versions ranging from 0.24.1 to 0.25.1. I'm utilizing https_proxy with http2 set to True.
I've conducted two test cases. When I execute one of them individually, it functions as expected. However, if I run both test cases simultaneously, the second one fails. Disabling https_proxy or setting http2 to False resolves the issue, allowing both test cases to run successfully.
Traceback (most recent call last):
File "d:\work\code\github\demo.venv\lib\site-packages\openai_base_client.py", line 1307, in _request
response = await self._client.send(request, auth=self.custom_auth, stream=stream)
File "d:\work\code\github\demo.venv\lib\site-packages\httpx_client.py", line 1617, in send
response = await self._send_handling_auth(
File "d:\work\code\github\demo.venv\lib\site-packages\httpx_client.py", line 1645, in _send_handling_auth
response = await self._send_handling_redirects(
File "d:\work\code\github\demo.venv\lib\site-packages\httpx_client.py", line 1682, in _send_handling_redirects
response = await self._send_single_request(request)
File "d:\work\code\github\demo.venv\lib\site-packages\httpx_client.py", line 1719, in _send_single_request
response = await transport.handle_async_request(request)
File "d:\work\code\github\demo.venv\lib\site-packages\httpx_transports\default.py", line 366, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\connection_pool.py", line 262, in handle_async_request
raise exc
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\connection_pool.py", line 245, in handle_async_request
response = await connection.handle_async_request(request)
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\http_proxy.py", line 344, in handle_async_request
return await self._connection.handle_async_request(request)
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\http2.py", line 185, in handle_async_request
raise exc
File "d:\work\code\github\demo.venv\lib\site-packages\openai_base_client.py", line 1307, in _request
response = await self._client.send(request, auth=self.custom_auth, stream=stream)
File "d:\work\code\github\demo.venv\lib\site-packages\httpx_client.py", line 1617, in send
response = await self._send_handling_auth(
File "d:\work\code\github\demo.venv\lib\site-packages\httpx_client.py", line 1645, in _send_handling_auth
response = await self._send_handling_redirects(
File "d:\work\code\github\demo.venv\lib\site-packages\httpx_client.py", line 1682, in _send_handling_redirects
response = await self._send_single_request(request)
File "d:\work\code\github\demo.venv\lib\site-packages\httpx_client.py", line 1719, in _send_single_request
response = await transport.handle_async_request(request)
File "d:\work\code\github\demo.venv\lib\site-packages\httpx_transports\default.py", line 366, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\connection_pool.py", line 262, in handle_async_request
raise exc
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\http2.py", line 142, in handle_async_request
await self._send_request_headers(request=request, stream_id=stream_id)
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\http2.py", line 249, in _send_request_headers
await self._write_outgoing_data(request)
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\http2.py", line 466, in _write_outgoing_data
raise self._write_exception # pragma: nocover
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\connection_pool.py", line 245, in handle_async_request
response = await connection.handle_async_request(request)
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\http_proxy.py", line 344, in handle_async_request
return await self._connection.handle_async_request(request)
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\http2.py", line 185, in handle_async_request
raise exc
File "d:\work\code\github\demo.venv\lib\site-packages\openai_base_client.py", line 1307, in _request
response = await self._client.send(request, auth=self.custom_auth, stream=stream)
File "d:\work\code\github\demo.venv\lib\site-packages\httpx_client.py", line 1617, in send
response = await self._send_handling_auth(
File "d:\work\code\github\demo.venv\lib\site-packages\httpx_client.py", line 1645, in _send_handling_auth
response = await self._send_handling_redirects(
File "d:\work\code\github\demo.venv\lib\site-packages\httpx_client.py", line 1682, in _send_handling_redirects
response = await self._send_single_request(request)
File "d:\work\code\github\demo.venv\lib\site-packages\httpx_client.py", line 1719, in _send_single_request
response = await transport.handle_async_request(request)
File "d:\work\code\github\demo.venv\lib\site-packages\httpx_transports\default.py", line 366, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\connection_pool.py", line 262, in handle_async_request
raise exc
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\http2.py", line 142, in handle_async_request
await self._send_request_headers(request=request, stream_id=stream_id)
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\http2.py", line 249, in _send_request_headers
await self._write_outgoing_data(request)
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\http2.py", line 466, in _write_outgoing_data
raise self._write_exception # pragma: nocover
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\connection_pool.py", line 245, in handle_async_request
response = await connection.handle_async_request(request)
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\http_proxy.py", line 344, in handle_async_request
return await self._connection.handle_async_request(request)
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\http2.py", line 185, in handle_async_request
raise exc
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\http2.py", line 142, in handle_async_request
await self._send_request_headers(request=request, stream_id=stream_id)
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\http2.py", line 249, in _send_request_headers
await self._write_outgoing_data(request)
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\http2.py", line 481, in _write_outgoing_data
raise exc
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_async\http2.py", line 469, in _write_outgoing_data
await self._network_stream.write(data_to_send, timeout)
File "d:\work\code\github\demo.venv\lib\site-packages\httpcore_backends\anyio.py", line 51, in write
await self._stream.send(item=buffer)
File "d:\work\code\github\demo.venv\lib\site-packages\anyio\streams\tls.py", line 202, in send
await self._call_sslobject_method(self._ssl_object.write, item)
File "d:\work\code\github\demo.venv\lib\site-packages\anyio\streams\tls.py", line 168, in _call_sslobject_method
await self.transport_stream.send(self._write_bio.read())
File "d:\work\code\github\demo.venv\lib\site-packages\anyio_backends_asyncio.py", line 1300, in send
self._transport.write(item)
File "C:\Python310\lib\asyncio\proactor_events.py", line 361, in write
self._loop_writing(data=bytes(data))
File "C:\Python310\lib\asyncio\proactor_events.py", line 397, in _loop_writing
self._write_fut = self._loop._proactor.send(self._sock, data)
AttributeError: 'NoneType' object has no attribute 'send'
Beta Was this translation helpful? Give feedback.
All reactions