[New-bugs-announce] [issue41638] Error message: sqlite3.ProgrammingError: You did not supply a value for binding # might be improved
Wolfgang Fahl
report at bugs.python.org
Wed Aug 26 02:16:55 EDT 2020
New submission from Wolfgang Fahl <wf at bitplan.com>:
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.
----------
components: Library (Lib)
messages: 375906
nosy: WolfgangFahl
priority: normal
severity: normal
status: open
title: Error message: sqlite3.ProgrammingError: You did not supply a value for binding # might be improved
versions: Python 3.10
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41638>
_______________________________________
More information about the New-bugs-announce
mailing list