kk580kk opened a new issue #6499: [Bug] superset_config.py is not working as 
expecting.
URL: https://github.com/apache/incubator-superset/issues/6499
 
 
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [ ] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [ ] I have reproduced the issue with at least the latest released version 
of superset.
   - [ ] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   
   
   ### Superset version
   
https://github.com/apache/incubator-superset/commit/fc8acf27c82ef3030d641289fa80f926f2a83b76
   
   ### Expected results
   working  with settings from supset_config.py
   
   ### Actual results
   ```
   
   try:
       if CONFIG_PATH_ENV_VAR in os.environ:
           # Explicitly import config module that is not in pythonpath; useful
           # for case where app is being executed via pex.
           print('Loaded your LOCAL configuration at [{}]'.format(
               os.environ[CONFIG_PATH_ENV_VAR]))
           module = sys.modules[__name__]
           override_conf = imp.load_source(
               'superset_config',
               os.environ[CONFIG_PATH_ENV_VAR])
           for key in dir(override_conf):
               if key.isupper():
                   setattr(module, key, getattr(override_conf, key))
   
       else:
           from superset_config import *  # noqa
           import superset_config
           print('Loaded your LOCAL configuration at [{}]'.format(
               superset_config.__file__))
   except ImportError:
       pass
   ```
   there not CONFIG_PATH_ENV_VAR in os environment, and throw a exception when 
finding superset_config module "there is no superset_config module" .
   ### Steps to reproduce
   # Create a virtual environemnt and activate it (recommended)
   virtualenv -p python3 ./venv 
   # setup a python3.6 virtualenv
   source venv/bin/activate
   
   # Install external dependencies
   pip install -r requirements.txt
   pip install -r requirements-dev.txt
   # Install Superset in editable (development) mode
   pip install -e .
   
   # Create an admin user
   fabmanager create-admin --app superset
   
   # Initialize the database
   superset db upgrade
   
   # Create default roles and permissions
   superset init
   
   # Load some data to play with
   superset load_examples
   
   # Start the Flask dev web server from inside the `superset` dir (but see 
below for frontend asset compilation)
   cd superset
   flask run -p 8080 --with-threads --reload --debugger
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to