unable to open sqlite db path
ejakait opened this issue · 1 comments
ejakait commented
Using:
fastapi==0.68.0
After setup, setting the FASTAPI_SIMPLE_SECURITY_DB_LOCATION
does not change the path from the default of /app/sqlite.db as expected. Instead getting hit with this error sqlite3.OperationalError: unable to open database file
Looking at the _sqlite_access.py definition doing this instead:
def __init__(self): try: self.db_location = os.environ["FASTAPI_SIMPLE_SECURITY_DB_LOCATION"] except KeyError: self.db_location = ""
seems to work.
mrtolkien commented
I have not been able to replicate this bug. I'm using it mostly in Docker containers and have no issue pointing it at the right mounted folder.