Skip to content Skip to sidebar Skip to footer

Aws Elastic Beanstalk - Flask App Cannot Import Custom Module

I am trying to host a Flask app on AWS Elastic Beanstalk in Python 3.6, but no matter what I try, the application's url leads to a 500: Internal Server Error. The structure of my a

Solution 1:

I'd start by adding a blank file named __init__.py to the root of your application. Right now the Flask app in application.py can't detect your transformers because they are not on your python path, and they're not part of the same package.

Adding __init__.py will make your transformers importable using: from mytransformers import MyTransformer because it will add them to the application package.

Edit: Does it run locally?

Post a Comment for "Aws Elastic Beanstalk - Flask App Cannot Import Custom Module"