Python filesystem access
I am developing an app with Python. I need to create a sqlite database in the way like this:
path = '.local/share/harbour-myapp'
if (not os.path.isdir(path)):
os.mkdir(path)
db = os.path.join(path, 'harbour-myapp.db')
self.con = sqlite3.connect(db)
When I deploy the app everything works every time fine. When I close and start it again, I get:
sqlite3.OperationalError: unable to open database file
What does cause the error?