Hello, I have been trying to deploy a Flask App on render, but its failing. It is able to build from the git repo, but while deployment, it fails with this error:
No module named ‘your_application’
The same set of files works perfectly fine on Heroku.
You’ll need to double-check you’re installing all your dependencies in the Build Command, e.g. with pip.
If you are, the next thing to check would be the Start Command, is that the same as you had in your starting your web dyno on Heroku (the command in theProcfile after web:)?
I have added a requirements file containing the dependencies. Do I need to add the pip command in Procfile or elsewhere? It was not required on Heroku. I have uploaded the same folder to render, but its not working.
Your original error No module named ‘your_application' implies that you haven’t set the Start Command correctly, and are just using the placeholder defaults when creating a Python Web Service:
The Start Command needs to be the command that starts your own app. As you said it works on Heroku, I assume the command in the Procfile after web: would be the command you need to set as the Start Command (on the settings page of your service).