superset: gunicorn cant find create_app()
gunicorn cant find create_app()
gunicorn -b 0.0.0.0:6666 "superset.app:create_app()"
[2019-12-09 19:14:22 +0330] [23027] [INFO] Starting gunicorn 19.9.0
[2019-12-09 19:14:22 +0330] [23027] [INFO] Listening at: http://0.0.0.0:6666 (23027)
[2019-12-09 19:14:22 +0330] [23027] [INFO] Using worker: sync
[2019-12-09 19:14:22 +0330] [23031] [INFO] Booting worker with pid: 23031
Loaded your LOCAL configuration at [/home/superset/superset_config.py]
2019-12-09 19:14:24,395:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/gunicorn/util.py", line 362, in import_app
app = eval(obj, vars(mod))
File "<string>", line 1, in <module>
NameError: name 'create_app' is not defined
Failed to find application object 'create_app()' in 'superset.app'
[2019-12-09 19:14:25 +0330] [23031] [INFO] Worker exiting (pid: 23031)
[2019-12-09 19:14:26 +0330] [23027] [INFO] Shutting down: Master
[2019-12-09 19:14:26 +0330] [23027] [INFO] Reason: App failed to load.
Expected results
what you expected to happen.
Actual results
what actually happens.
Screenshots
If applicable, add screenshots to help explain your problem.
How to reproduce the bug
- Go to ‘…’
- Click on ‘…’
- Scroll down to ‘…’
- See error
Environment
(please complete the following information):
- superset version:
superset version - python version:
python --version - node.js version:
node -v - npm version:
npm -v
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.
Additional context
Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 33 (13 by maintainers)
Confirmed. Works with superset.app
gunicorn -w 10 -k gevent --timeout 120 -b 0.0.0.0:8088 --limit-request-line 0 --limit-request-field_size 0 --statsd-host localhost:8125 superset:app
try with: superset:app
I would imagine the doc site should have a pulldown where you browse the docs for various releases instead of having to do this.
I’m not able to replicate the problem, can you please create a clean/new virtualenv and reinstall superset and dependencies, then test and report back. If the problem persists, give us all commands you went through and output
"It’s not that it should be improved. "
the product is confusing, the docs don’t match the code, the docs should match the code things should be easy. things should not be hard. don’t make me think. installation is way too difficult, it used to be just “pip install superset” back in the day…
For those wishing to read the documentation associated with the current PyPI release (0.35.1), you can build them locally as follows:
Then load up
path/to/incubator-superset/docs/_build/html/installation.htmlin your browser.the docs are (currently) for the git master branch not the pypi release. The way to invoke superset via Unicorn changed:
"superset.app:create_app()"is for the git master branch"superset:app"is for the 0.35.1 and earlier releases.This is discussed here: https://lists.apache.org/thread.html/9c76f2da91dbf30035b1a7b5a496ca5bc93205482a64d1f96a2db642%40<dev.superset.apache.org>
Issue-Label Bot is automatically applying the label
#bugto this issue, with a confidence of 0.88. Please mark this comment with 👍 or 👎 to give our bot feedback!Links: app homepage, dashboard and code for this bot.