Skip to content
Sign upLog in
← Back to Community
Flask Error: Unexpected EOF while parsing
Profile icon
JordanDixon1

This is a very frustrating error that makes some people even give up learning Flask all together. It's a simple fix as well. All you have to do is replace a certain line of code...

If my guess is correct you used at the end of your main.py you put down something like this:

if __name__ == "__main__": @app.run(debug=False)

The problem with this is that you put down

@app
.run() instead of just app.run() That darn @ symbol is so frustrating. Remember that we only use the @ symbol when we are telling the page what to do on a request or route.

Voters
Profile icon
Highwayman
Profile icon
JordanDixon1