uwsgi启动Django项目时:unable to load app 0 (mountpoint='') (callable not found or import error) *** no ap...

说起来有点坑

用命令都能正常启动,但是用配置文件就是不行

提示

unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***

最后准备睡觉了了,无意间解决了

uwsgi.ini文件的wsgi模块是这样写的,一直报错,网上的都找遍了还是没解决

module = AutoTestSite.wsgi:application //指定wsgi模块
 
 

最后修改注释,放到上面,成功启动了

#指定wsgi模块
module = AutoTestSite.wsgi:application

 

就这个问题坑我两天

转载于:https://www.cnblogs.com/gcgc/p/10146983.html

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
引用\[1\]和\[2\]中提到的错误信息是关于部署Django项目出现的问题。错误信息中指出了一个ModuleNotFoundError,即找不到名为'audio_upload.settings'的模块。同,还有一个ValueError,指出源代码字符串中不能包含空字节。这些错误导致了无法加载应用程序,从而出现了"unable to load app 0 (mountpoint='') (callable not found or import error)"的错误提示。 根据引用\[3\]中的解释,uWSGI在加载应用程序不会将其作为__main__运行,因此它永远不会找到该应用程序(因为只有在应用程序作为__main__运行才会加载)。因此,需要在if __name__ == "__main__"之外导入该模块。 要解决这个问题,您可以尝试将导入语句移动到if __name__ == "__main__"之外,确保正确导入了'audio_upload.settings'模块。这样uWSGI就能够正确加载应用程序并解决"unable to load app 0 (mountpoint='') (callable not found or import error)"的错误提示。 #### 引用[.reference_title] - *1* [uwsgi启动Django项目unable to load app 0 (mountpoint='') (callable not found or import error) ***...](https://blog.csdn.net/weixin_30550271/article/details/98959255)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [Python ValueError: source code string cannot contain null bytes unable to load app 0 (mountpoint=...](https://blog.csdn.net/u012561176/article/details/125527066)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [Flask and uWSGI - unable to load app 0 (mountpoint='') (callable not found or import error)](https://blog.csdn.net/weixin_33742618/article/details/94493663)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值