Learn to Code via Tutorials on Repl.it

← Back to all posts
Flask Error: Unexpected EOF while parsing
JordanDixon1 (269)

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__":

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.