sqlalchemy.exc.OperationalError: (OperationalError) unable to open database file None None
I had this issue with sqlite. The process trying to open the database file needs to have write access to the directory as it creates temporary/lock files.
The following structure worked for me to allow www-data to use the database.
%> ls -ldrwxrwxr-x 2 fmlheureux www-data 4096 Feb 17 13:24 database-dir%> ls -l database-dir/-rw-rw-r-- 1 fmlheureux www-data 40960 Feb 17 13:28 database.sqlite