Skip to content

Driver manager searches wrong path in $VIRTUAL_ENV #3479

@amoeba

Description

@amoeba

What happened?

I installed the latest Python driver manager and tried to load a driver while in a Python virtual environment and the driver I expected to find wasn't found. In the output I noticed the path being searched is not what I expected:

/home/bryce.linux/adbc-test/.venv/etc/adbc

I think it should be /home/bryce.linux/adbc-test/.venv/etc/adbc/drivers.

Full code:

>>> from adbc_driver_manager import dbapi
>>> dbapi.connect(driver="some_driver")
Traceback (most recent call last):
  File "<python-input-1>", line 1, in <module>
    dbapi.connect(driver="some_driver")
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bryce.linux/adbc-test/.venv/lib/python3.13/site-packages/adbc_driver_manager/dbapi.py", line 227, in connect
    db = _lib.AdbcDatabase(**db_kwargs)
  File "adbc_driver_manager/_lib.pyx", line 582, in adbc_driver_manager._lib.AdbcDatabase.__init__
  File "adbc_driver_manager/_lib.pyx", line 261, in adbc_driver_manager._lib.check_error
adbc_driver_manager.ProgrammingError: NOT_FOUND: [Driver Manager] dlopen() failed: some_driver: cannot open shared object file: No such file or directory
dlopen() failed: libsome_driver.so: cannot open shared object file: No such file or directory
Also searched these paths for manifests:
	not set: ADBC_DRIVER_PATH
	additional search path: /home/bryce.linux/adbc-test/.venv/etc/adbc
	not enabled at build time: Conda prefix
	user config dir: /home/bryce.linux/.config/adbc/drivers
	does not exist: /etc/adbc/drivers

Does this part of the driver manager code need to be updated?

Stack Trace

No response

How can we reproduce the bug?

No response

Environment/Setup

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions