DatabaseError: current transaction is aborted, commands ignored until end of transaction block?
Full error message
I got a lot of errors with the message : "DatabaseError: current transaction is aborted, commands ignored until end of transaction block" after changed from python-psycopg to python-psycopg2 as Django project's database engine. The code remains the same, just don't know where those errors are from.
Solutionsource: stackoverflow \u2197
This is what postgres does when a query produces an error and you try to run another query without first rolling back the transaction. (You might think of it as a safety feature, to keep you from corrupting your data.) To fix this, you'll want to figure out where in the code that bad query is being executed. It might be helpful to use the log_statement and log_min_error_statement options in your postgresql server.
API access
Get this solution programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/error/080000b8421be32b052962b14552744f0efb066ab94aca6ae94b3bbb80af93f2hash \u00b7 080000b8421be32b052962b14552744f0efb066ab94aca6ae94b3bbb80af93f2