Skip to content

Flask-restful in requirements.txt causes problems: need fix #1

Open
@zhiwenchong

Description

@zhiwenchong

Kudu builds with flask-restful but the app fails with these messages in log:

2020-02-20T00:00:31.040211104Z [2020-02-20 00:00:31 +0000] [37] [INFO] Starting gunicorn 19.9.0
2020-02-20T00:00:31.041417315Z [2020-02-20 00:00:31 +0000] [37] [INFO] Listening at: http://0.0.0.0:8000 (37)
2020-02-20T00:00:31.042140722Z [2020-02-20 00:00:31 +0000] [37] [INFO] Using worker: sync
2020-02-20T00:00:31.045314753Z [2020-02-20 00:00:31 +0000] [40] [INFO] Booting worker with pid: 40
2020-02-20T00:00:31.175970911Z [2020-02-20 00:00:31 +0000] [40] [ERROR] Exception in worker process
2020-02-20T00:00:31.175991011Z Traceback (most recent call last):
2020-02-20T00:00:31.175995311Z File "/opt/python/3.7.5/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2020-02-20T00:00:31.176007312Z worker.init_process()
2020-02-20T00:00:31.176010512Z File "/opt/python/3.7.5/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
2020-02-20T00:00:31.176021012Z self.load_wsgi()
2020-02-20T00:00:31.176024212Z File "/opt/python/3.7.5/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
2020-02-20T00:00:31.176027412Z self.wsgi = self.app.wsgi()
2020-02-20T00:00:31.176030512Z File "/opt/python/3.7.5/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2020-02-20T00:00:31.176033612Z self.callable = self.load()
2020-02-20T00:00:31.176036612Z File "/opt/python/3.7.5/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
2020-02-20T00:00:31.176039712Z return self.load_wsgiapp()
2020-02-20T00:00:31.176042812Z File "/opt/python/3.7.5/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
2020-02-20T00:00:31.176045912Z return util.import_app(self.app_uri)
2020-02-20T00:00:31.176048912Z File "/opt/python/3.7.5/lib/python3.7/site-packages/gunicorn/util.py", line 350, in import_app
2020-02-20T00:00:31.176052112Z import(module)
2020-02-20T00:00:31.176055112Z File "/home/site/wwwroot/application.py", line 4, in
2020-02-20T00:00:31.176058412Z from flask_restful import reqparse, Api, Resource
2020-02-20T00:00:31.176061512Z ModuleNotFoundError: No module named 'flask_restful'

The fix is to correct flask-restful to flask_restful. I don't have permissions to submit a pull request so someone needs to do this.

(I spent many frustrating hours troubleshooting this issue -- and this was my first Python deployment to Azure App Service)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions