Flask view raises TypeError got unexpected keyword argument

flask, python

Solution

You defined the route to be `/enviaplaca/<placa>`, but you defined the view function without the `placa` argument. The URL captures need to match the function arguments.

@app.route('/echoplaca/<placa>')
def echoplaca(placa):

Problem

I'm trying to make a request to the following view. However, I get the error `TypeError: echoplaca() got an unexpected keyword argument 'placa'`. ``` @app.route(r'/enviaplaca/<placa>') def echoplaca(): return "Numero de placa: {}".format(placa) ```

Original source