Revision history  [back]

Why can't I import fixtures from 'dump_forum' V 0.7.47?

I can't seem to import fixtures created by forum_dump.

To confirm this I created a new database with 1 user and 1 question.

I then:

$ python manage.py dump_forum

$ python manage.py flush

$ python manage.py load_forum test_dump_delete

WARNING!!! You are using a 'locmem' (local memory) caching backend,
which is OK for a low volume site running on a single-process server.
For a multi-process configuration it is neccessary to have a production
cache system, such as redis or memcached.

With local memory caching and multi-process setup you might intermittently
see outdated content on your site.

Traceback (most recent call last):  
  File "manage.py", line 11, in <module>  
    execute_manager(settings)  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager  
    utility.execute()  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute  
    self.fetch_command(subcommand).run_from_argv(self.argv)  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv  
    self.execute(*args, **options.__dict__)  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute  
    output = self.handle(*args, **options)  
  File "/Users/Bryan/work/askbot-discussion/askbot/management/commands/load_forum.py", line 16, in handle  
    management.call_command('loaddata', args[0])  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 166, in call_command  
    return klass.execute(*args, **defaults)  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute  
    output = self.handle(*args, **options)  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 223, in handle  
    transaction.commit(using=using)  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/transaction.py", line 142, in commit  
    connection.commit()  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/__init__.py", line 201, in commit  
    self._commit()  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 200, in _commit  
    return self.connection.commit()  
django.db.utils.IntegrityError: insert or update on table "askbot_groupmembership" violates foreign key constraint "authusergroups_ptr_id_refs_id_5cdfc23b7859c44e"  
DETAIL:  Key (authusergroups_ptr_id)=(1) is not present in table "auth_user_groups".

Why can't I import fixtures from 'dump_forum' V 0.7.47?

I can't seem to import fixtures created by forum_dump.

To confirm this I created a new database with 1 user and 1 question.

I then:

$ python manage.py dump_forum

$ python manage.py flush

$ python manage.py load_forum test_dump_delete

WARNING!!! You are using a 'locmem' (local memory) caching backend,
which is OK for a low volume site running on a single-process server.
For a multi-process configuration it is neccessary to have a production
cache system, such as redis or memcached.

With local memory caching and multi-process setup you might intermittently
see outdated content on your site.

Traceback (most recent call last):  
  File "manage.py", line 11, in <module>  
    execute_manager(settings)  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager  
    utility.execute()  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute  
    self.fetch_command(subcommand).run_from_argv(self.argv)  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv  
    self.execute(*args, **options.__dict__)  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute  
    output = self.handle(*args, **options)  
  File "/Users/Bryan/work/askbot-discussion/askbot/management/commands/load_forum.py", line 16, in handle  
    management.call_command('loaddata', args[0])  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 166, in call_command  
    return klass.execute(*args, **defaults)  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute  
    output = self.handle(*args, **options)  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 223, in handle  
    transaction.commit(using=using)  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/transaction.py", line 142, in commit  
    connection.commit()  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/__init__.py", line 201, in commit  
    self._commit()  
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 200, in _commit  
    return self.connection.commit()  
django.db.utils.IntegrityError: insert or update on table "askbot_groupmembership" violates foreign key constraint "authusergroups_ptr_id_refs_id_5cdfc23b7859c44e"  
DETAIL:  Key (authusergroups_ptr_id)=(1) is not present in table "auth_user_groups".