psycopg2.InternalError: how can I get more useful information?

I’m running this command in a Python script: try: print sql_string cursor.execute(sql_string) except: print sys.exc_info() and getting: (<class ‘psycopg2.InternalError’>, InternalError(‘current transaction is aborted, commands ignored until end of transaction block\n’,), <traceback object at 0x1010054d0>) However if I try the sql_string from the psql command line, it works just fine. I know the script is connecting … Read more