Make sqlite open errors clearer #1

Merged
dave merged 2 commits from dpedu/db-debug into master 2022-12-24 14:41:45 -08:00
Owner

If filesystem permissions on the directory the sqlite database database file is in are such that the app cannot list or create files, sqlite gives a vague error:

sqlite3.OperationalError: unable to open database file

whereas python's open() will give a better hint ("permission denied"). So, we try opening the database file with python first.

also, add chmods to the startup scripts to avoid this issue in the future

If filesystem permissions on the directory the sqlite database database file is in are such that the app cannot list or create files, sqlite gives a vague error: ``` sqlite3.OperationalError: unable to open database file ``` whereas python's open() will give a better hint ("permission denied"). So, we try opening the database file with python first. also, add chmods to the startup scripts to avoid this issue in the future
dave added 2 commits 2022-12-24 14:37:40 -08:00
debug print db path
All checks were successful
Gitea/pysonic/pipeline/head This commit looks good
f0b9074391
make sqlite open errors clearer
All checks were successful
Gitea/pysonic/pipeline/head This commit looks good
Gitea/pysonic/pipeline/pr-master This commit looks good
e5158cfdc7
if filesystem permissions on the directory the sqlite database database file is in are such that the app cannot list or create files, sqlite gives a vague error:

```
sqlite3.OperationalError: unable to open database file
```

whereas python's open() will give a better hint ("permission denied"). So, we try opening the database file with python first.

also, add chmods to the startup scripts to avoid this issue in the future
dave merged commit 092c833c4f into master 2022-12-24 14:41:45 -08:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: dave/pysonic#1
No description provided.