You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to run a copy of a notebook that worked fine previously (I think back in September 2022). The current version of the notebook is on Google Colaboratory, and it installs the latest LDLite (currently 0.0.35) with !pip install --upgrade ldlite.
It all starts okay. Connecting to FOLIO Snapshot worked fine, and I successfully completed several queries and selections. But when I try to set up a db cursor so I can follow the example for executing a SQL query (cur = db.cursor()), I get the following error:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[<ipython-input-63-9a71221bf8ff>](https://localhost:8080/#) in <module>
----> 1 cur = db.cursor()
AttributeError: 'NoneType' object has no attribute 'cursor'
If instead I change the database connection to db = ld.experimental_connect_db_sqlite(filename='ldlite-sqlite2.db'), I get an error when I try to query the LDLite instance. That is, this command
Sorry for the delay, but I don't seem to be having any better luck with the new version of LDLite/DuckDB. The notebook installs 0.0.36 (with DuckDB 0.6.1), and I can connect with either username/password or tenant/token, but when I use db = ld.connect_db() for the database, I still get a "'NoneType' object has no attribute 'cursor'" error.
If I use ld.experimental_connect_db_sqlite(), it actually works better. The db.cursor() command works, and I can execute queries using the cursor. But with that method, .fetchdf() fails with the error "'sqlite3.Cursor' object has no attribute 'fetchdf'." I figured I would wait to submit that issue, in case the NoneType issue with DuckDB can be fixed instead.
This seems to have broken with version 0.0.34. Installing version 0.0.33 directly, the connect_db() function returns an object of type DuckDBPyConnection. After 0.0.33, the function returns NoneType.
Have confirmed that restoring the return statement to connect_db() fixes this issue. (I forked, edited the file, and then ran pip install against the fork from Google Colab. Everything that worked back in 0.0.33 worked again with the fork.)
I was trying to run a copy of a notebook that worked fine previously (I think back in September 2022). The current version of the notebook is on Google Colaboratory, and it installs the latest LDLite (currently 0.0.35) with
!pip install --upgrade ldlite
.It all starts okay. Connecting to FOLIO Snapshot worked fine, and I successfully completed several queries and selections. But when I try to set up a db cursor so I can follow the example for executing a SQL query (
cur = db.cursor()
), I get the following error:If instead I change the database connection to
db = ld.experimental_connect_db_sqlite(filename='ldlite-sqlite2.db')
, I get an error when I try to query the LDLite instance. That is, this command_ = ld.query(table='users', path='/users', query='cql.allRecords=1 sortby id')
yields
The text was updated successfully, but these errors were encountered: