Deploying a Flask application on AWS
Scott Rodkey
69225

Thanks for the post!!

I can get the site (your github code) working locally, but when I go to the URL that beanstalk has created after deployment(in your example, thisisacoolflaskapp.elasticbeanstalk.com), I get 500 Internal Server Error. The logs show that it has something to do with a failed `from application import db` statement in `db.py`. Any idea how to diagnose?

```
[Mon Aug 29 23:56:30.340134 2016] [:error] [pid 3444] [remote 172.31.42.49:63593] File “/opt/python/current/app/application.py”, line 11, in <module>
[Mon Aug 29 23:56:30.340145 2016] [:error] [pid 3444] [remote 172.31.42.49:63593] from application import db
[Mon Aug 29 23:56:30.340166 2016] [:error] [pid 3444] [remote 172.31.42.49:63593] ImportError: cannot import name ‘db
```

Something to do with circular imports?

Thanks!

Like what you read? Give Hillary Sanders a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.