Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3991208
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:35:15+00:00 2026-05-20T06:35:15+00:00

I’m working on integrating OpenID with my own authentication Stack for Django. I’m using

  • 0

I’m working on integrating OpenID with my own authentication Stack for Django. I’m using python-openid, django 1.2.5 with postgresql, following the examples from the djopenid folder under examples/

What’s happening is this. I’m using a view that calls python-openid’s various mechanisms, which rely on models I’ve fed in. Somewhere in there, something’s breaking. My problem is not why it is broken, it is the fact that I can’t tell what is broken. My models are written directly against their implementation comments, but I have probably made a mistake or two.

This is the stack trace:

mod_wsgi (pid=5476): Exception occurred processing WSGI script 
'/var/www/Django/Testbed/Testbed.wsgi'., referer: 
http://localhost/testbed/openidlogin
 Traceback (most recent call last):, referer: 
http://localhost/testbed/openidlogin
   File "/usr/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 
252, in __call__, referer: http://localhost/testbed/openidlogin
     response = middleware_method(request, response), referer: 
http://localhost/testbed/openidlogin
   File 
"/usr/lib/python2.7/site-packages/django/contrib/sessions/middleware.py", line 
36, in process_response, referer: http://localhost/testbed/openidlogin
     request.session.save(), referer: http://localhost/testbed/openidlogin
   File 
"/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/db.py", line 
61, in save, referer: http://localhost/testbed/openidlogin
     sid = transaction.savepoint(using=using), referer: 
http://localhost/testbed/openidlogin
   File "/usr/lib/python2.7/site-packages/django/db/transaction.py", line 229, 
in savepoint, referer: http://localhost/testbed/openidlogin
     connection._savepoint(sid), referer: http://localhost/testbed/openidlogin
   File "/usr/lib/python2.7/site-packages/django/db/backends/__init__.py", line 
56, in _savepoint, referer: http://localhost/testbed/openidlogin
     self.cursor().execute(self.ops.savepoint_create_sql(sid)), referer: 
http://localhost/testbed/openidlogin
   File "/usr/lib/python2.7/site-packages/django/db/backends/util.py", line 15, 
in execute, referer: http://localhost/testbed/openidlogin
     return self.cursor.execute(sql, params), referer: 
http://localhost/testbed/openidlogin
   File 
"/usr/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py
", line 44, in execute, referer: http://localhost/testbed/openidlogin
     return self.cursor.execute(query, args), referer: 
http://localhost/testbed/openidlogin
 DatabaseError: current transaction is aborted, commands ignored until end of 
transaction block, referer: http://localhost/testbed/openidlogin

So I understand django is using postgresql transaction management and that somewhere in this process I’m doing something that causes an integrity issue with the database. But it doesn’t tell me what that might be, or where the error is in my code. I’ve tried turning this off in settings.py to see if a more sensible stack trace results. It doesn’t.

My question is very simple: How do I find out where the problem is? I can work backwards from an offending SQL statement (since that will tell me which models are failing) or even better a stack trace involving some of my code. Even “postgresql error code XYZ” gives me something to google. Are there some settings I can turn on that make django a little more talkative? I’m using

DEBUG = True
TEMPLATE_DEBUG = DEBUG

Obviously, but I’m not even getting a yellow error page. Just your plain old 500 Internal Server Error and that stack trace in the error log of apache. Is there somewhere else I can look? Some option I can enact or some whizzy tool that I can use to watch execution or something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T06:35:16+00:00Added an answer on May 20, 2026 at 6:35 am

    Run it via manage.py on some port, place ipdb.set_trace() call in your view and trace it step by step – like in any other debugging process.

    Also you can use built-in python/django logging features and just print our stuff to the log file.

    Look here for more tips – maybe some of them will be usefull for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I want use html5's new tag to play a wav file (currently only supported
Seemingly simple, but I cannot find anything relevant on the web. What is the
this is what i have right now Drawing an RSS feed into the php,
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.