Skip to content
Advertisement

werkzeug.routing.BuildError: Could not build url for endpoint ‘success’. Did you forget to specify values [‘name’]?

“werkzeug.routing.BuildError: Could not build url for endpoint ‘success’. Did you forget to specify values [‘name’]?”

How to solve this error? I have tried many things but can’t solve it by myself.

http_methods.py:

JavaScript

I get an error in the login method, that value of [‘name’] is not specified; how to solve this error?

login.html:

JavaScript

output:

JavaScript

I am using python 3.7 and flask 1.0.2 version right now.

Advertisement

Answer

Have a look at this. In your login function I added a render_template for the first GET request when opening the login page. This will probably also prevent the error you’re getting now. Bear in mind this does not contain any error handling, like what happens if user is unknown in your login procedure.

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