Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Debugging exceptions thrown by loaddata
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Bram Duvigneau  
View profile  
 More options Nov 4, 6:19 pm
From: Bram Duvigneau <bramduvign...@gmail.com>
Date: Thu, 05 Nov 2009 00:19:44 +0100
Local: Wed, Nov 4 2009 6:19 pm
Subject: Debugging exceptions thrown by loaddata
Hi all,

I'm trying to import a JSON fixture using loaddata. It gives me a
ProgrammingError because it seems that it's trying to put to much data
in a varchar. Without access to the variables in that scope, I'm quite
lost which record is causing this. Using "python -i manage.py loaddata
--traceback" doesn't  give me the opportunity to debug this using the
pdb postmortem debugger because the --traceback option just prints the
traceback to stdout.

In an older revision, this would just raise the exception. However, this
behavior has been changed because raise always gives a TransactionError.
So, should I open/reopen a ticket because --traceback was added to help
with debugging? However, it is quite worthless in int's current state.
For now I'm just catching all errors that the save call in the loaddata
command generates and start pdb from there running set_trace. Are there
other/better ways to raise the original exception instead of the
TransactionError?

Bram


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google