wooram1125 opened a new issue #8944: "RuntimeError: Working outside of application context." in Celery URL: https://github.com/apache/incubator-superset/issues/8944 A clear and concise description of what the bug is. ### Actual results ``` Traceback (most recent call last): File "c:\users\wooram\pycharmprojects\dighty-superset\venv\lib\site-packages\billiard\process.py", line 327, in _bootstrap self.run() File "c:\users\wooram\pycharmprojects\dighty-superset\venv\lib\site-packages\billiard\process.py", line 114, in run self._target(*self._args, **self._kwargs) File "c:\users\wooram\pycharmprojects\dighty-superset\venv\lib\site-packages\billiard\pool.py", line 286, in __call__ self.after_fork() File "c:\users\wooram\pycharmprojects\dighty-superset\venv\lib\site-packages\billiard\pool.py", line 395, in after_fork self.initializer(*self.initargs) File "c:\users\wooram\pycharmprojects\dighty-superset\venv\lib\site-packages\celery\concurrency\prefork.py", line 55, in process_initializer app.loader.init_worker() File "c:\users\wooram\pycharmprojects\dighty-superset\venv\lib\site-packages\celery\loaders\base.py", line 114, in init_worker self.import_default_modules() File "c:\users\wooram\pycharmprojects\dighty-superset\venv\lib\site-packages\celery\loaders\base.py", line 109, in import_default_modules return [self.import_task_module(m) for m in self.default_modules] File "c:\users\wooram\pycharmprojects\dighty-superset\venv\lib\site-packages\celery\loaders\base.py", line 109, in <listcomp> return [self.import_task_module(m) for m in self.default_modules] File "c:\users\wooram\pycharmprojects\dighty-superset\venv\lib\site-packages\celery\loaders\base.py", line 89, in import_task_module return self.import_from_cwd(module) File "c:\users\wooram\pycharmprojects\dighty-superset\venv\lib\site-packages\celery\loaders\base.py", line 98, in import_from_cwd package=package, File "c:\users\wooram\pycharmprojects\dighty-superset\venv\lib\site-packages\celery\utils\imports.py", line 111, in import_from_cwd return imp(module, package=package) File "c:\users\wooram\pycharmprojects\dighty-superset\venv\lib\site-packages\celery\loaders\base.py", line 92, in import_module return importlib.import_module(module, package=package) File "c:\users\wooram\pycharmprojects\dighty-superset\venv\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "C:\Users\wooram\PycharmProjects\dighty-superset\superset\sql_lab.py", line 43, in <module> from superset.db_engine_specs import BaseEngineSpec File "C:\Users\wooram\PycharmProjects\dighty-superset\superset\db_engine_specs\__init__.py", line 36, in <module> from superset.db_engine_specs.base import BaseEngineSpec File "C:\Users\wooram\PycharmProjects\dighty-superset\superset\db_engine_specs\base.py", line 55, in <module> config = app.config File "c:\users\wooram\pycharmprojects\dighty-superset\venv\lib\site-packages\werkzeug\local.py", line 348, in __getattr__ return getattr(self._get_current_object(), name) File "c:\users\wooram\pycharmprojects\dighty-superset\venv\lib\site-packages\werkzeug\local.py", line 307, in _get_current_object return self.__local() File "c:\users\wooram\pycharmprojects\dighty-superset\venv\lib\site-packages\flask\globals.py", line 52, in _find_app raise RuntimeError(_app_ctx_err_msg) RuntimeError: Working outside of application context. This typically means that you attempted to use functionality that needed to interface with the current application object in some way. To solve this, set up an application context with app.app_context(). See the documentation for more information. ``` #### How to reproduce the bug ``` celery worker --app=superset.tasks.celery_app:app --pool=prefork -O fair -c 4 ``` ### Environment - superset version: 0.999.0dev - python version: Python 3.6.8 - node.js version: v8.11.1 - npm version: 6.8.0 ### Checklist 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.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org