0

I'm running into some issue with check50. I know it's been ask before but the answer of some other topic do not apply to me.

enter image description here

I re-do both files but still getting the same output.

This is my output after I parse the name.

{'first': 'Adelaide', 'middle': None, 'last': 'Murton', 'house': 'Slytherin', 'birth': '1982'}

And after I convert it to tuple both key and vals to pass it in db.excecute

db.execute("INSERT INTO students VALUES (?, ?, ?, ?, ?)", vals)

And this is how it looks on my console.. enter image description here

0

This db.execute("INSERT INTO students VALUES (?, ?, ?, ?, ?)", vals) will give an error when the students table has the schema from the distro students.db. The distro students table has 6 columns, this query inserts only 5. check50 will test with a database that is configured as the one in the distro code. Therefore your code must work with that database structure.

0

Totally right.. I forgot that I deleted my db and creater anotherone, similar but not the same as the one in CS50. Also i had some issues with variable vals, but solve it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .