Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Target WSGI script not found or unable to stat

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

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

enter image description here

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?

like image 632
Rose Perrone Avatar asked Jul 18 '13 03:07

Rose Perrone


People also ask

What is WSGI script alias?

The WSGIScriptAlias directive behaves in the same manner as the Alias directive, except that it additionally marks the target directory as containing WSGI scripts, or marks the specific file-path as a script, that should be processed by mod_wsgi's wsgi-script handler.

What is WSGI config?

WSGI is a specification of a generic API for mapping between an underlying web server and a Python web application.


1 Answers

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).

like image 82
Sachit Nagpal Avatar answered Oct 04 '22 22:10

Sachit Nagpal