-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
gunicorn cant find create_app() #8795
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
Hi @blcksrx, can you please add the superset version your using? |
Master branch, I cloned it about an hour ago |
@blcksrx - Take a look here: https://github.com/apache/incubator-superset/blob/master/CONTRIBUTING.md#sql-lab-async Celery needs a pointer to the actual "celery instance": |
Its not about celery worker or celery beat. Its about running webserver with gunicorn |
Oops, didn't see that. I would second @dpgaspar's concern about not being up to date. After pulling latest, did you re-pip? It's possible that you're still pointing at something old in your site-packages... |
Ofcourse yes. I did it |
Sorry it's not clear to me, is it solved? |
No, its not solved yet |
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 |
Same error happened to me. Versions: followed setup instructions from official apache-superset "installation how-to" except that I did not created a virtualenv. All other steps done as how-to stated. |
same here, ubuntu 18.04.3 NameError: name 'create_app' is not defined |
This is starting to make a bit of sense. The docs are for master, whereas 0.35 still does things the old way. Try 'superset.app' instead of 'superset.app:create_app()'. After the next release, things should be consistent. |
(venv) root@mike5:~# gunicorn -w 2 -k gevent --timeout 120 -b 0.0.0.0:6666 --limit-request-line 0 --limit-request-field_size 0 --statsd-host localhost:8125 'superset.app' |
try with: superset:app |
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 |
Yes superset:app instead of superset.app fixed the issue, thank you |
If you look at the source code (0.35.1, you can see that the Flask App is defined in the superset module (in particular in init file---> superset:app Agree that documentation should be improved |
It's not that it should be improved. It just needs to be understood that the docs represent the master branch and not the pypi release. |
The online docs have an install section that suggest that one can install and upgrade apache via pip: but the documentation suggesting this is generated from the git master not the pip release. The building from source section of the docs is misleading. it says:
This is incorrect: any user that wants Superset to behave the way to docs advertise would do this. |
Hey since I'm a fresh new superset user, I'll provide my feedback as a noob which installs superset for the first time: following the documentation here: https://superset.incubator.apache.org/installation.html my first attempt was on debian 9, using the "pip procedure", then i've tried the "docker procedure", still on debian 9, (debian 9 is old and this didn't surprise me) so i've created an ubuntu 18.04.3 vps and here the "pip procedure" went smooth I'll admit that I was suprised by the problem with gunicorn, since I was expecting the "pip procedure" to be the stable (battle-tested) one. Also I got confused about the "docker procedure", which reads as follows: "It is currently not recommended to run docker-compose in production." Finally and most important: I'm still a little confused about which is the "stable" (for production use) procedure I must follow to install superset :) |
Installing it on a virtualenv works fine and stable for me, please see this. |
the docs are (currently) for the git master branch not the pypi release. The way to invoke superset via Unicorn changed:
This is discussed here: |
Thanks @miquel-simo this works like a charm |
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 |
I would imagine the doc site should have a pulldown where you browse the docs for various releases instead of having to do this. |
We have versioned docs here https://readthedocs.org/projects/apache-superset/ |
Nice job |
@john-sandall perhaps publishing the documentation on the website, instead of making people build the documentation? |
Also I made the versioned docs discoverable in the docs here: #9069 |
This is not true. The documentation does need improvement. At https://superset.incubator.apache.org/installation.html right now, both |
"It's not that it should be improved. " the product is confusing, the docs don't match the code, |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
gunicorn cant find create_app()
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
Environment
(please complete the following information):
superset version
python --version
node -v
npm -v
Checklist
Make sure these boxes are checked before submitting your issue - thank you!
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: