Hey,
Testing this setup and attempting to provide as much context/info as possible which seems a bit much to dump on this forum, is a GH issue a better space for all this info, or use something like pastebin for below logs?
I am also hosting an instance with a subpath and an auth header requirement and was having trouble with this config:
token = get_bearer_token()
host = “subdomain.labs.company.com”
client = weaviate.connect_to_custom(
http_host=host, # Hostname for the HTTP API connection
http_port=443,
path=“/8b449c1e-bdfd-4d87-b6f5-70b31bd03ae5/llm-tool-weaviate-master-weaviate/v1”,
http_secure=True,
grpc_host=host + “grpc”,
grpc_port=443,
grpc_secure=True,
headers={“Authorization”: token},
)
Created wheel for weaviate-client: filename=weaviate_client-4.9.1.dev4+g29d6e6e8-py3-none-any.whl size=378508 sha256=7200425a349cc28d48a99a65035ac4242f9fa07b811bb609257918d4450396bb
Stored in directory: /home/lochy/.cache/pip/wheels/be/17/ea/f64fb007c3c821e6b3b0d4350b014e7e57e528bb653af3d0fe
Successfully built weaviate-client
Installing collected packages: weaviate-client
Attempting uninstall: weaviate-client
Found existing installation: weaviate-client 4.9.0
Uninstalling weaviate-client-4.9.0:
Successfully uninstalled weaviate-client-4.9.0
Successfully installed weaviate-client-4.9.1.dev4+g29d6e6e8
Traceback (most recent call last):
File “/home/lochy/repos/llm-tools/llm-tool-weaviate/demo.py”, line 26, in
client = weaviate.connect_to_custom(
TypeError: connect_to_custom() got an unexpected keyword argument ‘path’
Changed to http_path and got this error instead:
Traceback (most recent call last):
File “/home/lochy/repos/llm-tools/llm-tool-weaviate/demo.py”, line 32, in
client = weaviate.connect_to_custom(
File “/home/lochy/repos/llm-tools/llm-tool-weaviate/.venv/lib/python3.10/site-packages/weaviate/connect/helpers.py”, line 390, in connect_to_custom
return __connect(
File “/home/lochy/repos/llm-tools/llm-tool-weaviate/.venv/lib/python3.10/site-packages/weaviate/connect/helpers.py”, line 416, in __connect
raise e
File “/home/lochy/repos/llm-tools/llm-tool-weaviate/.venv/lib/python3.10/site-packages/weaviate/connect/helpers.py”, line 412, in __connect
client.connect()
File “/home/lochy/repos/llm-tools/llm-tool-weaviate/.venv/lib/python3.10/site-packages/weaviate/syncify.py”, line 23, in sync_method
return _EventLoopSingleton.get_instance().run_until_complete(
File “/home/lochy/repos/llm-tools/llm-tool-weaviate/.venv/lib/python3.10/site-packages/weaviate/event_loop.py”, line 40, in run_until_complete
return fut.result()
File “/home/lochy/.asdf/installs/python/3.10.13/lib/python3.10/concurrent/futures/_base.py”, line 458, in result
return self.__get_result()
File “/home/lochy/.asdf/installs/python/3.10.13/lib/python3.10/concurrent/futures/_base.py”, line 403, in __get_result
raise self._exception
File “/home/lochy/repos/llm-tools/llm-tool-weaviate/.venv/lib/python3.10/site-packages/weaviate/client_base.py”, line 153, in connect
await self._connection.connect(self._skip_init_checks)
File “/home/lochy/repos/llm-tools/llm-tool-weaviate/.venv/lib/python3.10/site-packages/weaviate/connect/v4.py”, line 146, in connect
await self._open_connections(self._auth, skip_init_checks)
File “/home/lochy/repos/llm-tools/llm-tool-weaviate/.venv/lib/python3.10/site-packages/weaviate/connect/v4.py”, line 242, in _open_connections
self.__make_clients()
File “/home/lochy/repos/llm-tools/llm-tool-weaviate/.venv/lib/python3.10/site-packages/weaviate/connect/v4.py”, line 227, in __make_clients
self._client = self.__make_async_client()
File “/home/lochy/repos/llm-tools/llm-tool-weaviate/.venv/lib/python3.10/site-packages/weaviate/connect/v4.py”, line 220, in __make_async_client
return AsyncClient(
File “/home/lochy/repos/llm-tools/llm-tool-weaviate/.venv/lib/python3.10/site-packages/httpx/_client.py”, line 1389, in init
super().init(
File “/home/lochy/repos/llm-tools/llm-tool-weaviate/.venv/lib/python3.10/site-packages/httpx/_client.py”, line 183, in init
self.headers = Headers(headers)
File “/home/lochy/repos/llm-tools/llm-tool-weaviate/.venv/lib/python3.10/site-packages/httpx/_models.py”, line 72, in init
self._list = [
File “/home/lochy/repos/llm-tools/llm-tool-weaviate/.venv/lib/python3.10/site-packages/httpx/_models.py”, line 76, in
normalize_header_value(v, encoding),
File “/home/lochy/repos/llm-tools/llm-tool-weaviate/.venv/lib/python3.10/site-packages/httpx/_utils.py”, line 53, in normalize_header_value
return value.encode(encoding or “ascii”)
AttributeError: ‘NoneType’ object has no attribute ‘encode’