Target WSGI script not found or cannot install

The target WSGI script was not found or could not be installed: /opt/python/current/app/application.py

I contained my application in a file called application.py , and my application configuration looks like this:

enter image description here

I also tried downloading an example application that provides AWS, which contains only "application.py", and yet I still get this error.

What can cause an error?

+7
amazon-web-services elastic-beanstalk
source share
2 answers

I had a similar problem. You must put your application.py in the root directory as WSGIPath suggests, or change the WSGIPath in .elasticbeanstalk/optionsettings.yourappname-env .

+3
source share

For me, I had an application instance stored in a variable called app that was not recognized by Elastic Beanstalk. As soon as I changed the variable to application , it started working.

 # In application.py or manage.py, after initialising the app application = app 

gotta do the trick.

0
source share

All Articles