Hi I'm trying to import lines from a CSV, but I can't handle type errors. For example, if you insert a string in a datetime field, I get this error in the create:
psycopg2.errors.InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block
Despite handling errors with
try:
my_module.create()
exception Except:
#stuff
pass
How can I check the values before I get to create or at least handle the error and take other actions. For the moment if I insert a field that is not present on a selection, I manage with try catch but I can't for data types