Skip to content

[BUG] ClientManager should verify db_url is pointing to a chroma server before creating the client #240

Description

@Davidyz

Discussed in #239

Originally posted by ahakanbaba July 8, 2025
This is the error message I am getting

$ vectorcode drop
ERROR: vectorcode.main : Traceback (most recent call last):
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/httpx/_transports/default.py", line 101, in map_httpcore_exceptions
    yield
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/httpx/_transports/default.py", line 394, in handle_async_request
    resp = await self._pool.handle_async_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 256, in handle_async_request
    raise exc from None
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 236, in handle_async_request
    response = await connection.handle_async_request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/httpcore/_async/connection.py", line 103, in handle_async_request
    return await self._connection.handle_async_request(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/httpcore/_async/http11.py", line 136, in handle_async_request
    raise exc
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/httpcore/_async/http11.py", line 106, in handle_async_request
    ) = await self._receive_response_headers(**kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/httpcore/_async/http11.py", line 177, in _receive_response_headers
    event = await self._receive_event(timeout=timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/httpcore/_async/http11.py", line 231, 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 "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/vectorcode/main.py", line 86, in async_main
    return_val = await drop(final_configs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/vectorcode/subcommands/drop.py", line 12, in drop
    async with ClientManager().get_client(config) as client:
  File "/usr/lib/python3.11/contextlib.py", line 210, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/vectorcode/common.py", line 268, in get_client
    if not await try_server(configs.db_url):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/vectorcode/common.py", line 53, in try_server
    response = await client.get(url=heartbeat_url)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/httpx/_client.py", line 1768, in get
    return await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/httpx/_client.py", line 1540, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/httpx/_client.py", line 1629, in send
    response = await self._send_handling_auth(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/httpx/_client.py", line 1657, in _send_handling_auth
    response = await self._send_handling_redirects(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/httpx/_client.py", line 1694, in _send_handling_redirects
    response = await self._send_single_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/httpx/_client.py", line 1730, in _send_single_request
    response = await transport.handle_async_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/site-packages/httpx/_transports/default.py", line 393, in handle_async_request
    with map_httpcore_exceptions():
  File "/usr/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/home/coder/.local/pipx/venvs/vectorcode/lib/python3.11/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.

This is the config file

$ cat .vectorcode/config.json5
// ~/.config/vectorcode/config.json5
{
  "hnsw": {
    "hnsw:M": 64,
    "hnsw:construction_ef": 200,
    "hnsw:search_ef": 20,
  },
}

The usually printed " Using the bundled chroma server... " is even not printing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions