无法加载应用程序 0 (mountpoint='') - 带有 uwsgi 的 Flask 应用程序
unable to load app 0 (mountpoint='') - Flask app with uwsgi
我有一个 python 结构如下的烧瓶应用程序
Admin
|-app
| -__init__.py
|-wsgi.py
我的wsgi.py内容如下
#!/usr/bin/python
from app import app
from app import views
if __name__ == '__main__':
app.run()
应用程序包中 init.py 的内容
#!/usr/bin/python
from flask import Flask
app = Flask(__name__)
我是这样启动wsgi的
uwsgi --socket 127.0.0.1:8080 --protocol=http -w wsgi
服务器启动成功,但我在启动日志中出现如下错误
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 709
your memory page size is 4096 bytes
detected max file descriptor number: 256
lock engine: OSX spinlocks
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 127.0.0.1:8080 fd 3
Python version: 2.7.6 (default, Sep 9 2014, 15:04:36) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x7fd7eb6000d0
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72760 bytes (71 KB) for 1 cores
*** Operational MODE: single process ***
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 70195, cores: 1)
发布了类似的问题,但针对这些问题提供的任何解决方案都已在我的代码中。我无法找到出现此错误的原因。
谢谢
"Callable not found is the issue"(我怀疑不是导入错误)。变化:
uwsgi --socket 127.0.0.1:8080 --protocol=http -w wsgi
进入这个
uwsgi --socket 127.0.0.1:8080 --protocol=http -w wsgi:app
或
uwsgi --socket 127.0.0.1:8080 --protocol=http --module wsgi --callable app
我有一个 python 结构如下的烧瓶应用程序
Admin
|-app
| -__init__.py
|-wsgi.py
我的wsgi.py内容如下
#!/usr/bin/python
from app import app
from app import views
if __name__ == '__main__':
app.run()
应用程序包中 init.py 的内容
#!/usr/bin/python
from flask import Flask
app = Flask(__name__)
我是这样启动wsgi的
uwsgi --socket 127.0.0.1:8080 --protocol=http -w wsgi
服务器启动成功,但我在启动日志中出现如下错误
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 709
your memory page size is 4096 bytes
detected max file descriptor number: 256
lock engine: OSX spinlocks
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 127.0.0.1:8080 fd 3
Python version: 2.7.6 (default, Sep 9 2014, 15:04:36) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x7fd7eb6000d0
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72760 bytes (71 KB) for 1 cores
*** Operational MODE: single process ***
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 70195, cores: 1)
发布了类似的问题,但针对这些问题提供的任何解决方案都已在我的代码中。我无法找到出现此错误的原因。
谢谢
"Callable not found is the issue"(我怀疑不是导入错误)。变化:
uwsgi --socket 127.0.0.1:8080 --protocol=http -w wsgi
进入这个
uwsgi --socket 127.0.0.1:8080 --protocol=http -w wsgi:app
或
uwsgi --socket 127.0.0.1:8080 --protocol=http --module wsgi --callable app