I have a flask application that works file until I try and assign a full path to the location of my sqlite3 db. I will need to have a full path to allow the user to switch db's if need.
I have developed the app with the db's in the same location as the .py files now I have moved the db and it can't find the tables.
python code: I originally tried "+" before os.path.join.
BasePath = "/storage/resources/dbase/dbSTR/SS1/"
...
tfile = os.path.join(BasePath,"dbSTR.db")
print(tfile)
conn = sqlite3.connect(tfile)
the tfile variable has : /storage/resources/dbase/dbSTR/SS1/dbSTR.db
The error is can't find strlocmotif table. i.e. db is empty.
Command line from where the .py file is stored:
sqlite3 /storage/resources/dbase/dbSTR/SS1/dbSTR.db
SQLite version 3.25.2 2018-09-25 19:08:10
Enter ".help" for usage hints.
sqlite> .tables
COHORTS directives hg19 newfeat2 strlocmotif
attribs duplicates meta relations
autoincrements features newattrib strloc