Message375907
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. |
|
Date |
User |
Action |
Args |
2020-08-26 06:30:00 | WolfgangFahl | set | recipients:
+ WolfgangFahl |
2020-08-26 06:30:00 | WolfgangFahl | set | messageid: <1598423400.76.0.760239892224.issue41638@roundup.psfhosted.org> |
2020-08-26 06:30:00 | WolfgangFahl | link | issue41638 messages |
2020-08-26 06:30:00 | WolfgangFahl | create | |
|