"current transaction is aborted, commands ignored until end of transaction block"

Hello,

I am getting the following on simple SELECT:
psycopg2.errors.InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block

Why would a SELECT fail even if a transaction is running.

Saqib

A quick look on StackOverflow makes me think that you might need to roll back the failed transaction. If that isn’t it, can you post some code that reproduces this error message?