Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python/SQLITE - OperationalError: no such module: RTREE

Tags:

python

sqlite

I had a python script, which up until last week was operating fine now I receive the error: OperationalError: no such module: RTREE

The code is here :

conn = sqlite3.connect(sqlite_db_link)

#Update dates and fields from Julian to Gregorian + 10.5 hours
conn.execute('ALTER TABLE SQLITE_TABLE ADD COLUMN Date_Received_G DATE')
conn.execute('UPDATE SQLITE_TABLE SET Date_Received_G = date(Date_Received, "localtime")')

The script simply adds a new date field to the database and then updates it with the date updated to local time (from UTS Julian Date it is downloaded as)

Anyone have any ideas?

like image 581
Matt Avatar asked Aug 15 '26 07:08

Matt


1 Answers

Some virtual table in this database is using the R-tree module, and the version of the SQLite library used by your Python is not compiled with that.

You can access this database only with an SQLite library that has R-tree support.

like image 111
CL. Avatar answered Aug 16 '26 22:08

CL.