title: flask get method which accepts a parameter : Missing 1 required positional argument
body: <p>I have the following flask code </p>
  
  <pre><code>from flask import Flask, jsonify, request                                                                                                                                                                          
  from webargs import fields                                                                                                                                                                                         
  from sqlalchemy import create_engine, MetaData, Table, select                                                                                                                                                      
  from flask_cors import CORS                                                                                                                                                                                                                                                                                                                                                                                                           
  engine = create_engine('...')                                                                                                                                                                                                                                                                                                                                            
  ////                                                                                                                                                                                                                                                                                                                                                                                                  
  app = Flask(__name__)                                                                                                                                                                                                                                                                                                                                                                                                                 
  cors = CORS(app, resources={r"/list*": {"origins": "*"}})                                                                                                                                                                                                                                                                                                                                                                             
  
  @app.route('/list-vessels', methods=['GET'])                                                                                                                                                                       
  def list_vessels():                                                                                                                                                                                                    
  vessel_list = []                                                                                                                                                                                                   
  s = select([vesseldetail.c.Vessel])                                                                                                                                                                                
  rp = connection.execute(s)                                                                                                                                                                                         
  for row in rp:                                                                                                                                                                                                         
      vessel_list.extend(list(row))                                                                                                                                                                                  
  return jsonify(vessel_list)                                                                                                                                                                                                                                                                                                                                                                                                       
  
  @app.route('/list-keydates', methods=['GET'])                                                                                                          
  def list_keydates(vesselname):                                                                                                                                                                                         
      vesselname = request.args['vesselname']      
      intervention_list = []                                                                                                                                                                                             
      keydate_list = []                                                                                                                                                                                                  
      s = select([keydate.c.Intervention, keydate.c.Date])                                                                                                                                                               
      s = s.where(keydate.c.VESSEL==vesselname)                                                                                                                                                                          
      rp = connection.execute(s)                                                                                                                                                                                         
      for row in rp:                                                                                                                                                                                                         
          intervention_list.append((row[0]))                                                                                                                                                                                 
          keydate_list.append((row[1]))                                                                                                                                                                                  
      return jsonify({"keydates": keydate_list, "intervention": intervention_list})
  
  if __name__ == '__main__':
      app.run(debug=True)  
  </code></pre>
  
  <p>The second endpoint 'list-keydates' returns a <code>TypeError: list_keydates() missing 1 required positional argument: 'vesselname'</code> even when I pass a vesselname in the query string. What am I doing wrong?</p>