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:30:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1598423400.76.0.760239892224.issue41638@roundup.psfhosted.org>
In-reply-to
Content
My workaround starts with:
try:
            self.c.executemany(insertCmd,listOfRecords)
            self.c.commit()
        except sqlite3.ProgrammingError as pe:
            msg=pe.args[0]
            if "You did not supply a value for binding" in msg:
                columnIndex=int(re.findall(r'\d+',msg)[0])
                columnName=list(entityInfo.typeMap.keys())[columnIndex-1]
                raise Exception("%s\nfailed: no value supplied for column '%s'" % (insertCmd,columnName))
            else:
                raise pe

which gives me:

Exception: INSERT INTO Pokemon (name,type) values (:name,:type)
failed: no value supplied for column 'type'

but not the data yet. So i am now forced to implement another insert that does not use executemany (which i like a lot) just to get proper debug information - this is a pitty.
History
Date User Action Args
2020-08-26 06:30:00WolfgangFahlsetrecipients: + WolfgangFahl
2020-08-26 06:30:00WolfgangFahlsetmessageid: <1598423400.76.0.760239892224.issue41638@roundup.psfhosted.org>
2020-08-26 06:30:00WolfgangFahllinkissue41638 messages
2020-08-26 06:30:00WolfgangFahlcreate