Skip to content

Python: Driver manager not using entrypoint from manifest #3290

@ianmcook

Description

@ianmcook

What happened?

Steps to reproduce (on macOS):

Download libduckdb.dylib from https://github.com/duckdb/duckdb/releases/download/v1.3.2/libduckdb-osx-universal.zip and put it somewhere where dlopen can find it.

Install a nightly build of the driver manager:

pip install --pre --extra-index-url https://repo.fury.io/arrow-adbc-nightlies adbc-driver-manager

Create a manifest foo.toml containing this:

[Driver]
entrypoint = 'duckdb_adbc_init'
shared = 'duckdb'

In the same directory where foo.toml is, run:

import pyarrow as pa
from adbc_driver_manager import dbapi
import os

os.environ['ADBC_CONFIG_PATH'] = os.getcwd()

with dbapi.connect(
    driver="foo",
) as con, con.cursor() as cursor:
    cursor.execute("SELECT 1;")
    cursor.fetch_arrow_table()

Stack Trace

Traceback (most recent call last):
  File "<python-input-18>", line 1, in <module>
    with dbapi.connect(
         ~~~~~~~~~~~~~^
        driver="foo"
        ^^^^^^^^^^^^
    ) as con, con.cursor() as cursor:
    ^
  File "/Users/ian/adbc-examples/python-duckdb/python-duckdb-4/.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 569, 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.InternalError: INTERNAL: [Driver Manager] dlsym(AdbcDriverInit) failed: dlsym(0x722fcba0, AdbcDriverInit): symbol not found

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions