On Thu, Jul 17, 2008 at 5:02 PM, andrewljohnson <[EMAIL PROTECTED]>
wrote:

>
> Hi,
>
> I am getting a strange programming error, and I wonder what causes it?
>
> The Error
> ========
> ProgrammingError at /trips/viewtrip/2/
> ERROR: current transaction is aborted, commands ignored until end of
> transaction block SET client_encoding to 'UNICODE'
>

This means a prior sql statement has generated an error that has caused the
database to ignore all subsequent statements issued by your transaction.


> This error is triggered by calling {{trip.owner}}
>

This isn't really the root problem, it's just where the previous error is
getting noticed.  Something is generating an error earlier, and for some
reason that one is being silently ignored, but the database has gotten into
a state where it refuses to do any more work on this transaction.


>
> If you go to this URL you will see the error in question (I have debug
> mode turned on): http://www.trailbehind.com/trips/viewtrip/2/
>
>
> A Couple of Notes
> ==============
> 1) This error does not occur if you are logged in as the trip.owner
> (i.e. trip.owner == request.user).
>

So one place to start is to look at what you are doing differently in those
two code paths.  Also it seems like it must be someplace where you have
caught an exception and continued on (because I think the backend must be
raising an exception when the original error happens).  You've let your code
continue but the database is not in a state where it will do so.


>
> 2. This error doesn't occur on my development machine, and I think
> that may be because I am running a slightly different version of
> psycopg.
>

I thought this was fairly normal psycopg/PostgreSQL behavior and not
version-specific, but I don't have a lot of experience with that DB so I
could be wrong there.

Karen

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to