This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author WolfgangFahl
Recipients WolfgangFahl
Date 2020-08-26.06:16:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1598422615.42.0.67853581727.issue41638@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-08-26 06:16:55WolfgangFahlsetrecipients: + WolfgangFahl
2020-08-26 06:16:55WolfgangFahlsetmessageid: <1598422615.42.0.67853581727.issue41638@roundup.psfhosted.org>
2020-08-26 06:16:55WolfgangFahllinkissue41638 messages
2020-08-26 06:16:55WolfgangFahlcreate