Skip to content
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

DTale -Flask - Heroku - Gunicorn - Deployment problem #575

Closed
ShoubhikBanerjee opened this issue Sep 26, 2021 · 1 comment
Closed

DTale -Flask - Heroku - Gunicorn - Deployment problem #575

ShoubhikBanerjee opened this issue Sep 26, 2021 · 1 comment

Comments

@ShoubhikBanerjee
Copy link

Hi !

I was trying to deploy a Heroku app build with Flask using Gunicorn.

I have embedded flask as shown in : https://github.com/man-group/dtale/blob/master/docs/EMBEDDED_FLASK.md

My Gunicorn cmd : web: gunicorn app:app --preload -b 0.0.0.0:8080
But facing this issue :

Traceback (most recent call last): File "/app/.heroku/python/bin/gunicorn", line 8, in <module> sys.exit(run()) File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in run WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 228, in run super().run() File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 72, in run Arbiter(self).run() File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 58, in __init__ self.setup(app) File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/arbiter.py", line 118, in setup self.app.wsgi() File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 49, in load return self.load_wsgiapp() File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp return util.import_app(self.app_uri) File "/app/.heroku/python/lib/python3.9/site-packages/gunicorn/util.py", line 405, in import_app raise AppImportError("Failed to find attribute %r in %r." % (name, module)) gunicorn.errors.AppImportError: Failed to find attribute 'app' in 'app'.

Is there any way I can get this solved ?

Thanx in advance :)

@aschonfeld
Copy link
Collaborator

@ShoubhikBanerjee heres an example of running D-Tale in gunicorn w/ redis for storage (so all gunicorn workers feed from the same data). Not 100% sure if using Heroku will throw a wrench into things or not. Let me know if this helps and if not I can dig into it deeper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants