question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gunicorn cant find create_app()

See original GitHub issue

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

  1. Go to ‘…’
  2. Click on ‘…’
  3. Scroll down to ‘…’
  4. 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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:33 (13 by maintainers)

github_iconTop GitHub Comments

9reactions
miquel-simocommented, Dec 15, 2019

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

7reactions
edge7commented, Dec 15, 2019

try with: superset:app

Read more comments on GitHub >

github_iconTop Results From Across the Web

gunicorn cant find create_app() · Issue #8795 · apache/superset
gunicorn cant find create_app() gunicorn -b 0.0.0.0:6666 ... "superset.app:create_app()" is for the git master branch
Read more >
Gunicorn can't find app when name changed from "application"
Gunicorn (and most WSGI servers) defaults to looking for the callable named application in whatever module you point it at.
Read more >
Running Gunicorn — Gunicorn 20.1.0 documentation
You can run Gunicorn by using commands or integrate with popular frameworks like Django, Pyramid, or TurboGears. For deploying Gunicorn in production see...
Read more >
Flask application with gunicorn in the app platform does not ...
I have a flask application that I am trying to run in the app of platforms with a gunicorn. wsgi.py from app import...
Read more >
Gunicorn — Flask Documentation (2.2.x)
Gunicorn is easy to install, as it does not require external dependencies or ... create_app()' $ gunicorn -w 4 'hello:create_app()' Starting gunicorn 20.1.0 ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found