0

I am very new to python flask, please advise me. I have been trying to deploy my web app built with React and Flask and I have struggled. I have googled around how to deploy but still can't deploy. What should I do..?

error message says no module named server.

 ModuleNotFoundError: No module named 'server'

 [INFO] Reason: Worker failed to boot.

 at=error code=H10 desc="App crashed" method=GET path="/" 

this is my work directory right now.

enter image description here

this is my server.py

enter image description here

this is my Procfile

web: gunicorn server:app

1 Answer 1

1

Move your project files out of the venv folder and into the main directory where your Procfile is stored.

Heroku is not finding server.py because it is not in the same folder as Procfile. The venv directory should not have your project code in it and should be reserved for package management purposes.

Sign up to request clarification or add additional context in comments.

2 Comments

oh thank you, that worked. but i have another error saying: "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again." I'm not quite sure what I need to do.
My guess is that you were trying to access the url yourapp.herokuapp.com/ and not yourapp.herokuapp.com/email. Similar issue here. If this doesn't fix it, I'd suggest opening another question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.