Flask and uWSGI - unable to load app 0 (mountpoint='') (callable not found or import error)

后端 未结 3 1314
[愿得一人]
[愿得一人] 2020-11-29 23:57

I get the below error when I try and start Flask using uWSGI. Here is how I start:

>  # cd ..
>     root@localhost:# uwsgi --socket 127.0.0.1:6000 --fi         


        
3条回答
  •  天涯浪人
    2020-11-29 23:57

    I had problems with the accepted solution because my flask app was in a variable called app. You can solve that with putting just this in your wsgi:

    from module_with_your_flask_app import app as application
    

    So the problem was simply that uwsgi expects a variable called application.

提交回复
热议问题