sorieux commented on issue #28336:
URL: https://github.com/apache/superset/issues/28336#issuecomment-2355707841
> When you specify the relative path to `sqlite:///superset.db`, when you
execute `superset db upgrade`, it will also initialize a superset.db file under
`pythonxx/site-packages/superset` in venv environment. The `ab_user` table is
in here. I think it has a bug, if you specify a relative path it will generate
two superset.db files, and the table is also distributed in different files.
Using absolute paths solves this problem: in custom `superset_config.py`
>
> ```
> import os
> # Gets the directory of the current script file
> SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
> DB_PATH = os.path.abspath(os.path.join(SCRIPT_DIR, ".superset", "test.db"))
> SQLALCHEMY_DATABASE_URI = f"sqlite:///{DB_PATH}?check_same_thread=false"
> print(f"SQLite database path: {DB_PATH}")
> PREVENT_UNSAFE_DB_CONNECTIONS = False
> ```
Thank you, I had the same issue as Grundprinzip. Using the absolute path to
the SQLite database resolved my problem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]