Message375906
def testBindingError(self):
'''
test list of Records with incomplete record leading to
"You did not supply a value for binding 2"
'''
listOfRecords=[{'name':'Pikachu', 'type':'Electric'},{'name':'Raichu' }]
resultList=self.checkListOfRecords(listOfRecords,'Pokemon','name')
Which eventually will call:
insertCmd=entityInfo.insertCmd
self.c.executemany(insertCmd,listOfRecords)
self.c.commit()
leading to the error message:
sqlite3.ProgrammingError: You did not supply a value for binding 2.
When many thousand records are inserted this message is not very helpful.
you might want to improve it to:
sqlite3.ProgrammingError: You did not supply a value for binding 2 ("type") in record #2 with a debug option that shows the actual date like:
sqlite3.ProgrammingError: You did not supply a value for binding 2 ("type") in record #2 debuginfo: name="Raichu", type=missing
sqlite3.ProgrammingError: You did not supply a value for binding 2. |
|
Date |
User |
Action |
Args |
2020-08-26 06:16:55 | WolfgangFahl | set | recipients:
+ WolfgangFahl |
2020-08-26 06:16:55 | WolfgangFahl | set | messageid: <1598422615.42.0.67853581727.issue41638@roundup.psfhosted.org> |
2020-08-26 06:16:55 | WolfgangFahl | link | issue41638 messages |
2020-08-26 06:16:55 | WolfgangFahl | create | |
|