I have looked at the few topics on this and tried the various proposed solutions (here for instance) but still I can't open my sqlite database.
It used to work smoothly but recently (I can't pinpoint when) I got the error:
Sqlite3, OperationalError: unable to open database file
Current set-up: the database is on an external hardrive connected to a mac mini via USB. I use a macbook pro to connect to this mac mini "server" via Ethernet. From my macbook pro, the following code returns the error:
import sqlite3 as sq3
import os
filename = '/Volumes/AGCM_DB/Database/AGCM.db'
conn = sq3.connect(filename)
What I tried:
running the code directly from the mac mini works fine
if I copy/paste the database onto my macbook pro, running the code works fine.
there is plenty of space available on the external harddrive, macbookpro and mac mini
from my macbook pro, I ran
print(os.path.exists(filename))
which returns True so my macbook pro "sees" the file on the external harddrive via the mac mini.
I checked the permissions on the folder Database and on the file AGCM.db and my macbook pro has read&write.
My guess is that I am missing some permissionning somewhere (but where?).
Mac Mini: OS High Sierra Macbook pro: OS Big Sur
EDIT: I did another test of reading a ".csv" file and get an error "Operation not permitted" So this tells me I have a permission issue and it is not an sqlite issue