Re: Error in a simple query

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Gustavo <gmpuljak(at)yahoo(dot)com(dot)ar>
Cc: psycopg(at)postgresql(dot)org
Subject: Re: Error in a simple query
Date: 2013-06-24 23:04:46
Message-ID: 51C8D08E.8030105@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On 06/24/2013 03:55 PM, Gustavo wrote:
> Hi,
>
> I'm using psycopg2 extensively in different scripts to process spatial data
> with postgresql 9.1 and postgis. However, in one script I have the following
> error:
>
> psycopg2.internalerror: current transaction is aborted, commands ignored until
> end of transaction block
>
> The command that gave the error is:
>
> a = """select idbalizas from nuevo.balizas where %s %s %s %s""" % (emp1,
> dnid1, mem1, mmsi1)
> print
> cur.execute(a)
>
> One example of 'a' is:
>
> select idbalizas from nuevo.balizas where emp='005' and dnid='08466' and
> mem='055' and mmsi='701000535'
>
> I can run this same query in psql and other postgresql clients and it returns
> the correct answer.
>
> Can you help me debugging this?

What shows up in the Postgres log?

> Many thanks.
>
>
>

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message maplabs 2013-06-24 23:06:48 Re: Error in a simple query
Previous Message Gustavo 2013-06-24 22:55:41 Error in a simple query