db.execute() returning KeyError when using one keyword argument twice
Closed this issue · 1 comments
Raghav1999 commented
below is the example of SQL query which produces KeyError:
db.execute("SELECT col1,col2 FROM table WHERE col3=:email AND col4=:email AND col5=:dob", email=email, dob=dob)
Here, the same keyword argument :email is used twice in the query but it raises KeyError in cs50 7.0.1 but it was working fine previously.
Using '?' positional arguments works fine.
kzidane commented
Good catch! Should be fixed in 7.0.2. Thank you.