I have a script functions.py that contains functions for all the database processing in sql, and another one that imports functions.py and is supposed to call something like functions.get_all_entries_in_database(). However, I always get this error:
Traceback (most recent call last):
File "/private/var/mobile/Containers/Shared/AppGroup/A76B1CFC-263B-4F7C-8D73-F7A0548010E8/Pythonista3/Documents/Codes/Audio/Main.py", line 52, in change_playing_mode_action
modes = manager.get_playing_modes(id)
File "/private/var/mobile/Containers/Shared/AppGroup/A76B1CFC-263B-4F7C-8D73-F7A0548010E8/Pythonista3/Documents/Codes/Audio/db_lib.py", line 144, in get_playing_modes
modes = c.execute('SELECT %s FROM playing_mode ORDER BY id'%keywords).fetchall()
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread.The object was created in thread id 6163689472 and this is thread id 4315310976
salite3.threadsafety doesn’t chance anything...