[英]how to send log at the end of script or when invoked? using logger module
[英]uWSGI module found when invoked on the command line but not when invoked using emperor
我有一个在uWSGI下运行的python wsgi应用程序。
当我尝试使用Emperor运行相同的应用程序时,出现错误-
ImportError: No module named app_thing
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
如果我运行uWSGI,直接指定皇帝正在使用的配置文件,它将找到该模块,并且该应用程序可以正常工作。
下面的uWSGI配置文件。
[uwsgi]
socket = 127.0.0.1:8000
workers = 1
force-cwd = /home/user/py
module = app_thing:application
protocol = http
任何帮助表示赞赏...
好的,事实证明,该修复程序涉及设置文件而不是模块,以及将目录添加到uWSGI配置中的python路径。 最终配置结果为
[uwsgi]
socket = 127.0.0.1:8000
workers = 1
force-cwd = /home/py
file = /home/py/app_thing.py
pythonpath = /home/py
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.