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:
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?
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.
WSGI is a specification of a generic API for mapping between an underlying web server and a Python web application.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With