-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while executing "superset db upgrade" #30548
Comments
Hey @y2k3bikash, I'm here to help you out with this! 😊 It seems like you're encountering an issue with the configuration loading in Apache Superset. Here are some steps and solutions that might help:
These steps should help resolve the configuration loading issue. |
Bug description
Python Version: 3.10
OS: Ubuntu
Superset: apache-superset
Installed Virtual Environment
Activated It
pip install --upgrade pip setuptools wheel
pip install apache-superset
export FLASK_APP=superset
export SUPERSET_CONFIG_PATH=/superset_vir/lib/python3.9/site-packages/superset/config.py
Below Changes Done In Config.py:
* update SECRET_KEY & SQLALCHEMY_DATABASE_URI(MySQL) as per the need .
* Commented Below Line & Added Next 3 Lines:
#override_conf = imp.load_source("superset_config", cfg_path)
spec = importlib.util.spec_from_file_location("superset_config", cfg_path)
override_conf = importlib.util.module_from_spec(spec)
spec.loader.exec_module(override_conf)
execute "superset db upgrade"
Got Below Error After That:
superset db upgrade
Failed to import config for SUPERSET_CONFIG_PATH=/superset_vir/lib/python3.10/site-packages/superset/config.py
Traceback (most recent call last):
File "/superset_vir/lib/python3.10/site-packages/superset/config.py", line 1708, in
module = sys.modules[name]
KeyError: 'superset_config'
Failed to import config for SUPERSET_CONFIG_PATH=/superset_vir/lib/python3.10/site-packages/superset/config.py
Traceback (most recent call last):
File "/superset_vir/lib/python3.10/site-packages/superset/config.py", line 1712, in
spec.loader.exec_module(override_conf)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/superset_vir/lib/python3.10/site-packages/superset/config.py", line 1708, in
module = sys.modules[name]
KeyError: 'superset_config'
Traceback (most recent call last):
File "/superset_vir/bin/superset", line 5, in
from superset.cli.main import superset
File "/superset_vir/lib/python3.10/site-packages/superset/cli/main.py", line 28, in
from superset.cli.lib import normalize_token
File "/superset_vir/lib/python3.10/site-packages/superset/cli/lib.py", line 20, in
from superset import config
File "/superset_vir/lib/python3.10/site-packages/superset/config.py", line 1712, in
spec.loader.exec_module(override_conf)
File "/superset_vir/lib/python3.10/site-packages/superset/config.py", line 1708, in
module = sys.modules[name]
KeyError: 'superset_config'
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.10
Node version
Not applicable
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: