Error: gunicorn: Failed to find application object 'app' in 'app'

后端 未结 2 1308
醉梦人生
醉梦人生 2020-12-11 15:36

Here\'s my code:

app.py

from flask_graphql import GraphQLView
from app.infrastructure.graphql import schema
from app.infrastructure.api_resource impo         


        
2条回答
  •  粉色の甜心
    2020-12-11 16:08

    You have a folder called app (as by the import lines in your file) and a app.py file.

    Gunicorn will try to find the app WSGI variable inside the app module, which in your case is identified as app/__init__.py

    You need to rename your folder or your app.py file to avoid this conflict.

提交回复
热议问题