Running the latest django vesion, just ran svn.

Cut down models:

class VenueType(models.Model):
     venueTypeName = models.CharField(maxlength=200, db_index=True)
     venueTypeSlug = models.SlugField(prepopulate_from= 
('venueTypeName',), db_index=True)
     class Admin:
         pass

class Venue(models.Model):
     venueSlug = models.SlugField(prepopulate_from=('venueName',),  
unique=True, db_index=True)
     venueType = models.ManyToManyField(VenueType,  
filter_interface=models.HORIZONTAL)

Error:

Loading 'test' fixtures...
Installing json fixture 'test' from absolute path.
Installed 1 object(s) from 1 fixture(s)
Traceback (most recent call last):
   File "./manage.py", line 11, in <module>
     execute_manager(settings)
   File "/opt/python/lib/python2.5/site-packages/django/core/ 
management.py", line 1674, in execute_manager
     execute_from_command_line(action_mapping, argv)
   File "/opt/python/lib/python2.5/site-packages/django/core/ 
management.py", line 1588, in execute_from_command_line
     action_mapping[action](args[1:], int(options.verbosity))
   File "/opt/python/lib/python2.5/site-packages/django/core/ 
management.py", line 1418, in load_data
     cursor.execute(line)
   File "/opt/python/lib/python2.5/site-packages/django/db/backends/ 
util.py", line 12, in execute
     return self.cursor.execute(sql, params)
   File "/opt/python/lib/python2.5/site-packages/django/db/backends/ 
postgresql/base.py", line 44, in execute
     return self.cursor.execute(sql, [smart_basestring(p,  
self.charset) for p in params])
psycopg.ProgrammingError: ERROR:  relation "guide_venuetype_id_seq"  
does not exist

SELECT setval('Guide_venuetype_id_seq', (SELECT max("id") FROM  
"Guide_venuetype"));

Hope this helps.

Thanks again,

Mark



On 04/05/2007, at 4:46 PM, Russell Keith-Magee wrote:


On 5/4/07, Mark Jarecki <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I've come across an issue trying to loaddata into my database, and am
> wondering if anyone else has come across this too? and how to go about
> fixing it.
>
> I have Apache2.2.4, mod_python3.3.1, Python-2.5.1, postgresql-8.2.4,
> psycopg2-2.0.5.1 installed.
>
> Please let me know if you require any more information.

Django version? :-)

> The following is the error I receive:
...
> psycopg.ProgrammingError: ERROR:  relation "guide_venuetype_id_seq"  
> does not
> exist
>
> SELECT setval('Guide_venuetype_id_seq', (SELECT max("id")
> FROM "Guide_venuetype"));

The problem here is that the sequence providing data for the
guide.venuetype table hasn't been created. The only reason I can think
that this wouldn't exist is if you are using a custom primary key on
your guide.venuetype table. Is this the case?

Failing that, can you provide the models.py for the app that causes
this problem (or preferably a cut down minimalist version that
exhibits the problem)?

Yours,
Russ Magee %-)




--~--~---------~--~----~------------~-------~--~----~
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