tursodatabase / libsql-client-py

Python SDK for libSQL
https://libsql.org/libsql-client-py/
MIT License
54 stars 10 forks source link

TypeError: Row argument 1 must be Cursor, not Cursor #18

Open niki-sp opened 1 year ago

niki-sp commented 1 year ago

v 0.3.0 When using existing sqlite3 database i get

Traceback (most recent call last):
  File "e.py", line 81, in __getitem__
    r = self._cursor.fetchone()
        ^^^^^^^^^^^^^^^^^^^^^^^
  File "~/.local/lib/python3.11/site-packages/libsql_client/dbapi2/types.py", line 845, in __init__
    raise TypeError(msg)
TypeError: Row argument 1 must be Cursor, not Cursor

Removing issubclass(cur_tp, Cursor) check seems to restore normal operation

niki-sp commented 1 year ago

Same error with full names: TypeError: Row argument 1 must be <class 'libsql_client.dbapi2.types.Cursor'>, not <class 'sqlite3.Cursor'>