找不到目标WSGI脚本或无法统计 [英] Target WSGI script not found or unable to stat

查看:163
本文介绍了找不到目标WSGI脚本或无法统计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

找不到目标WSGI脚本或无法对其进行统计:/opt/python/current/app/application.py

Target WSGI script not found or unable to stat: /opt/python/current/app/application.py

我将我的应用程序包含在名为application.py的文件中,并且我的应用程序的配置如下所示:

I contain my app in a file called application.py, and my application's configuration looks like this:

我还尝试上传AWS提供的示例应用程序,该应用程序仅包含"application.py",但仍然出现此错误.

I also tried uploading the sample app that AWS provides, which only contains 'application.py`, and yet I still get this error.

可能是什么原因导致错误?

What could be causing the error?

推荐答案

对我来说,这是愚蠢的事情.在我的Mac中,我通过右键单击文件夹/存储库并将其压缩为zip进行压缩.但是,类似的zip会解压缩以打开其中包含该应用程序的另一个文件夹.结果,EBS无法找到application.py. 因此,简单的解决方法是选择文件夹中的所有单个文件,以创建要上传的zip文件(或使用EB CLI进行上传).

For me, it was this silly thing. In my mac, I compressed by right-clicking on the folder/repository and compressing it to zip. However, a zip like that extracts to open another folder within it which contains the application. As a result, EBS is unable to locate application.py. The simple fix hence was to select all the individual files inside the folder to create the zip file for uploading (or using the EB CLI to upload).

这篇关于找不到目标WSGI脚本或无法统计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆