Repository navigation
Description
Traceback (most recent call last):
File "/app/api/routes.py", line 154, in generate_response
await client.connect()
File "/app/clientmanager/weaviate.py", line 98, in connect
await self.client.connect()
File "/usr/local/lib/python3.11/site-packages/weaviate/connect/executor.py", line 92, in _execute
return cast(T, exception_callback(e))
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/weaviate/connect/executor.py", line 38, in raise_exception
raise e
File "/usr/local/lib/python3.11/site-packages/weaviate/connect/executor.py", line 86, in _execute
res = await call
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/weaviate/connect/v4.py", line 1112, in connect
meta = await self.get_meta(False)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/weaviate/connect/executor.py", line 92, in _execute
return cast(T, exception_callback(e))
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/weaviate/connect/executor.py", line 38, in raise_exception
raise e
File "/usr/local/lib/python3.11/site-packages/weaviate/connect/executor.py", line 86, in _execute
res = await call
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/weaviate/connect/executor.py", line 92, in _execute
return cast(T, exception_callback(e))
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/weaviate/connect/v4.py", line 701, in exc
self.__handle_exceptions(e, error_msg)
File "/usr/local/lib/python3.11/site-packages/weaviate/connect/v4.py", line 657, in __handle_exceptions
raise e
File "/usr/local/lib/python3.11/site-packages/weaviate/connect/executor.py", line 86, in _execute
res = await call
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/httpx2/_client.py", line 1818, in send
response = await self._send_handling_auth(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/httpx2/_client.py", line 1846, in _send_handling_auth
response = await self._send_handling_redirects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/httpx2/_client.py", line 1881, in _send_handling_redirects
response = await self._send_single_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/httpx2/_client.py", line 1915, in _send_single_request
response = await transport.handle_async_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/httpx2/_transports/default.py", line 388, in handle_async_request
resp = await self._pool.handle_async_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/httpcore2/_async/connection_pool.py", line 242, in handle_async_request
raise exc from None
File "/usr/local/lib/python3.11/site-packages/httpcore2/_async/connection_pool.py", line 224, in handle_async_request
response = await connection.handle_async_request(pool_request.request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/httpcore2/_async/connection.py", line 94, in handle_async_request
raise exc
File "/usr/local/lib/python3.11/site-packages/httpcore2/_async/connection.py", line 74, in handle_async_request
stream = await self._connect(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/httpcore2/_async/connection.py", line 117, in _connect
stream = await self._network_backend.connect_tcp(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/httpcore2/_backends/auto.py", line 31, in connect_tcp
return await self._backend.connect_tcp(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/httpcore2/_backends/anyio.py", line 117, in connect_tcp
with anyio.fail_after(timeout):
File "/usr/local/lib/python3.11/contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/anyio/_core/_tasks.py", line 177, in fail_after
deadline = (current_time() + delay) if delay is not None else math.inf
~~~~~~~~~~~~~~~^~~~~~~
TypeError: unsupported operand type(s) for +: 'float' and 'Timeout'
I have both weaviate client 4.24.0 in my app as well as langchain with openai
it seems like weaviate client uses httpx while langchain and openai have httpx2 and somehow the weaviate client is attempting to make requests with httpx2 which doesn't like the Timeout object
I can't seem to find a workaround and i know that the weaviate client libraray doesn't import httpx2
Activity
fix(connect): send OIDC requests through our own httpx client (weavia…
dudanogueira commentedon Oct 22, 2026
hi @airedwin !! THanks for the report!
Can you provide an example on how you are instantiating the client and which depedency versions you have on your environment? Thanks!
airedwin commentedon Oct 22, 2026
Something like this
packages
fastapi==0.136.3
langchain==1.3.17
pydantic==2.13.4
python-dotenv==1.2.2
gunicorn==26.0.0
uvicorn==0.49.0
loguru==0.7.3
PyJWT==2.13.0
Requests==2.34.2
weaviate_client==4.24.0
SQLAlchemy==2.0.50
alembic==1.18.4
asyncpg==0.31.0
deepagents==0.7.9
langgraph==1.2.11
langgraph-sdk==0.4.3
langsmith==0.11.1
langgraph-checkpoint-postgres==3.1.2
psycopg[binary]==3.3.5
langchain-anthropic==1.7.2
langchain-ollama==1.1.0
langchain-openai==1.6.2
airedwin commentedon Oct 26, 2026
@dudanogueira hello, does that help?
airedwin commentedon Oct 28, 2026
I found a temp solution, it was due to authlib
langchain-openai installs openai, which installs httpx2.
weaviate_client==4.21.3 installs authlib (unpinned, which pulls authlib==1.9.1).
when authlib==1.9.1 sees httpx2 installed, it switches from httpx to httpx2, which crashes weaviate-client whenever a user connects with an OIDC Bearer token
Pinning the authlib<1.7 will do the trick
dudanogueira commentedon Nov 1, 2026
Hi! I have pushed a PR here, that is waiting for review: #2222