Norman,
I added those print statements and ran the script.  The output was
this over and over again:

///

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

//

Any suggestions?

On May 20, 3:24 pm, "Norman Harman" <[EMAIL PROTECTED]> wrote:
> Greg wrote:
> > Since we know what the exception is.  The email address already exist
> > in the db (I have unique=True for the email field).  I thought that
> > having 'except: pass' would solve that problem.  However, do I need to
> > catch a certain exception in order for my loop to continue.  Because
> > as of now when the exception happens my loop stops.
>
> You don't *know* that is what the exception is, you assume that.  This
> is one reason it is bad to catch all exceptions.  You don't know what
> you are getting.
>
> The loop, as written, will continue.  There is something else going on.
>
> I would add print statements to determine what is in fact happening.
>
> for row in reader:
>       try:
>           b = OrderEmail(name=row[0], email=row[1], been_sent="0")
>           b.save()
>           print "saved", row
>       except Exception, msg:
>           print msg
>
> --
> Norman J. Harman Jr.  512 912-5939
> Technology Solutions Group, Austin American-Statesman
> ___________________________________________________________________________
> Get out and about this spring with the Statesman! In print and online,
> the Statesman has the area's Best Bets and recreation events.
> Pick up your copy today or go to statesman.com 24/7.
--~--~---------~--~----~------------~-------~--~----~
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