I am running with DEBUG = True.  That's a good find.  Thanks.

I figured out the problem, but I think there is a bug here.

The field from the data that I believed to be the primary key was
really not a key, and duplicated itself.  I had that field set as
primary_key=True in the model.  Thus, the "key" would repeat and the
row would not be inserted.

However, no exception was ever raised about a duplicate primary key on
save().  I am puzzled by this.  Why would it not complain about a
primary key violation?

On Dec 5, 12:29 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On 12/4/07, Brian Morton <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm not sure what could be causing this problem.  This is a loader
> > script that is loading a CSV and using the Django ORM to do lookups
> > and inserts.  This is on a workstation with 1GB of memory running
> > Ubuntu Gutsy (the MySQL server is local also).  I'm using MySQLdb
> > 1.2.2 and there do not seem to be any relevant bugs fixed since then.
> > Here is the traceback.
>
> > Out of memory (Needed 8164 bytes)
> > Traceback (most recent call last):
> >   File "loader.py", line 66, in <module>
> >     food = Food.objects.get(nutrient_databank_number=row[0])
>
> How big is what your are loading?  How long does it run before you hit the
> out or memory error?  Are you running the script with a settings file that
> has DEBUG set to True?  See:
>
> http://code.djangoproject.com/ticket/3711
>
> 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