Skip to content
Advertisement

werkzeug.routing.BuildError: Could not build url for endpoint ‘profile’. Did you mean ‘index’ instead?

I’m new to programming and I’m following this tutorial: https://www.youtube.com/watch?v=SUC1aTu092w&ab_channel=edureka%21 | I’m trying to make a login system using flask and MySQLdb and I’ve run into this problem, I’m so confused. There’s nothing wrong with the database, I’ve checked multiple times. I’m using VS code. Error: werkzeug.routing.BuildError: Could not build url for endpoint ‘profile’. Did you mean ‘index’ instead?

app.py

JavaScript

login.html:

JavaScript

register.html

JavaScript

profile.html

JavaScript

Advertisement

Answer

Spacing is critical in python. Each line that starts w/ @app.route should start at the far left. Also I fixed your profile route name.

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement