Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: make it clear that driver manager usage is not the intended usage #1981

Closed
avm19 opened this issue Jul 8, 2024 · 6 comments · Fixed by #2001
Closed

docs: make it clear that driver manager usage is not the intended usage #1981

avm19 opened this issue Jul 8, 2024 · 6 comments · Fixed by #2001
Assignees
Labels
Type: bug Something isn't working

Comments

@avm19
Copy link

avm19 commented Jul 8, 2024

What happened?

Driver Manager code in Tutorial does not work:

with adbc_driver_manager.AdbcDatabase(driver="adbc_driver_sqlite") as db:
    with adbc_driver_manager.AdbcConnection(db) as conn:
        pass

Possibly related to #1435, which AFAIU was fixed in #1436 for in CI script only.

Stack Trace

---------------------------------------------------------------------------
InternalError                             Traceback (most recent call last)
Cell In[2], line 1
----> 1 with adbc_driver_manager.AdbcDatabase(driver=\"adbc_driver_sqlite\") as db:
      2     with adbc_driver_manager.AdbcConnection(db) as conn:
      3         pass

File ~/00_temp/.venv-dev/lib/python3.11/site-packages/adbc_driver_manager/_lib.pyx:491, in adbc_driver_manager._lib.AdbcDatabase.__init__()

File ~/00_temp/.venv-dev/lib/python3.11/site-packages/adbc_driver_manager/_lib.pyx:260, in adbc_driver_manager._lib.check_error()

InternalError: INTERNAL: [Driver Manager] [DriverManager] dlopen() failed: adbc_driver_sqlite: cannot open shared object file: No such file or directory
dlopen() failed: libadbc_driver_sqlite.so: cannot open shared object file: No such file or directory"

How can we reproduce the bug?

(see above)

Environment/Setup

import adbc_driver_manager, adbc_driver_sqlite, adbc_driver_postgresql
adbc_driver_manager.__version__, adbc_driver_sqlite.__version__, adbc_driver_postgresql.__version__
# ('1.1.0', '1.1.0', '1.1.0')
@avm19 avm19 added the Type: bug Something isn't working label Jul 8, 2024
@lidavidm
Copy link
Member

lidavidm commented Jul 8, 2024

How were things installed?

@lidavidm
Copy link
Member

lidavidm commented Jul 8, 2024

And what platform?

@lidavidm
Copy link
Member

lidavidm commented Jul 8, 2024

Ah

@lidavidm
Copy link
Member

lidavidm commented Jul 8, 2024

Ok, if you're installing from pip, you need to pass the full path to the driver. Or as recommended, use connect from the driver, instead of doing this

@lidavidm lidavidm changed the title DriverManager Tutorial error adbc_driver_sqlite: cannot open shared object file docs: make it clear that driver manager usage is not the intended usage Jul 8, 2024
@lidavidm lidavidm added this to the ADBC Libraries 14 milestone Jul 8, 2024
@lidavidm
Copy link
Member

lidavidm commented Jul 8, 2024

Changes here:

  • Clearly note that this is not the intended usage
  • Convert this to a cookbook example so that it is actually tested

@avm19
Copy link
Author

avm19 commented Jul 9, 2024

Yes: everything was installed via pip, Python 3, Amazon Linux 2.

Ok, if you're installing from pip, you need to pass the full path to the driver. Or as recommended, use connect from the driver, instead of doing this

Thanks. I was confused by the following sentence here https://arrow.apache.org/adbc/current/python/driver_manager.html#usage :

driver must be the name of a library to load, or the path to a library to load

Passing the full path to adbc_driver_sqlite/libadbc_driver_sqlite.so works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants