hevel / goflow

Automatically exported from code.google.com/p/goflow
Other
0 stars 0 forks source link

Test applications broken #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When trying to run syncdb on either the testgoflow or leave application, 
I get the following traceback (granted the paths are different for each 
app):

Problem installing 
fixture 
'/home/jkugler/tmp/goflow-svn/trunk/goflow/testgoflow/../testgoflow/test1/fixtur
es/initial_data.json': 
Traceback (most recent call last):

File 
"/usr/lib/python2.5/site-packages/django/core/management/commands/loaddata.py", 
line 121, in handle
    obj.save()

File "/usr/lib/python2.5/site-packages/django/core/serializers/base.py", 
line 163, in save
    models.Model.save_base(self.object, raw=True)
  File "/usr/lib/python2.5/site-packages/django/db/models/base.py", line 
331, in save_base
    rows = manager.filter(pk=pk_val)._update(values)
  File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 
427, in _update
    return query.execute_sql(None)

File "/usr/lib/python2.5/site-packages/django/db/models/sql/subqueries.py", 
line 117, in execute_sql
    cursor = super(UpdateQuery, self).execute_sql(result_type)
  File "/usr/lib/python2.5/site-packages/django/db/models/sql/query.py", 
line 1652, in execute_sql
    cursor.execute(sql, params)
  File "/usr/lib/python2.5/site-packages/django/db/backends/util.py", 
line 19, in execute
    return self.cursor.execute(sql, params)

File "/usr/lib/python2.5/site-packages/django/db/backends/sqlite3/base.py", 
line 167, in execute
    return Database.Cursor.execute(self, query, params)
IntegrityError: columns content_type_id, codename are not unique

This is Python 2.5 on Ubuntu. With both apps, the exception is the same.  
This is with revision 139, trunk, by the way.

Original issue reported on code.google.com by pedah...@gmail.com on 30 Aug 2008 at 12:21

GoogleCodeExporter commented 9 years ago
trunk/sampleproject does not generate this error, by the wya.

Original comment by pedah...@gmail.com on 30 Aug 2008 at 12:25

GoogleCodeExporter commented 9 years ago
you should remove auth.permissions items from initial_data.json.
rev141: auth.permissions removed

Original comment by esimo...@gmail.com on 30 Aug 2008 at 8:24

GoogleCodeExporter commented 9 years ago
I have downloaded the latest checkout from svn, but Im still getting this 
error. 

Original comment by saurav....@gmail.com on 25 Aug 2009 at 1:45

GoogleCodeExporter commented 9 years ago
This is my error log file when i try to run python manange.py syncdb --noinput

D:\work\sigma\leavedemo>python manage.py syncdb --noinput
Creating table auth_permission
Creating table auth_group
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
Creating table workflow_activity
Creating table workflow_process
Creating table workflow_application
Creating table workflow_pushapplication
Creating table workflow_transition
Creating table workflow_userprofile
Creating table graphics2_processimage
Creating table graphics2_activityposition
Creating table runtime_processinstance
Creating table runtime_workitem
Creating table runtime_event
Creating table apptools_defaultappmodel
Creating table apptools_image
Creating table apptools_icon
Creating table apptools_imagebutton
Creating table leave_leaverequest
Creating table leave_manager
Creating table leave_account
Installing index for auth.Permission model
Installing index for auth.Message model
Installing index for admin.LogEntry model
Installing index for workflow.Activity model
Installing index for workflow.Process model
Installing index for workflow.Transition model
Installing index for graphics2.ProcessImage model
Installing index for graphics2.ActivityPosition model
Installing index for runtime.ProcessInstance model
Installing index for runtime.WorkItem model
Installing index for runtime.Event model
Installing index for apptools.ImageButton model
Installing index for leave.LeaveRequest model
Installing index for leave.Manager model
Installing index for leave.Account model
Installing json fixture 'initial_data' from 'C:\Python25\lib\site-packages\goflo
w\workflow\fixtures'.
Installing json fixture 'initial_data' from 'C:\Python25\lib\site-packages\goflo
w\apptools\fixtures'.
Installing json fixture 'initial_data' from 'D:\work\sigma\leavedemo\..\leavedem
o\leave\fixtures'.
Problem installing fixture 'D:\work\sigma\leavedemo\..\leavedemo\leave\fixtures\
initial_data.json': Traceback (most recent call last):
  File "C:\Python25\Lib\site-packages\django\core\management\commands\loaddata.p
y", line 153, in handle
    obj.save()
  File "C:\Python25\Lib\site-packages\django\core\serializers\base.py", line 163
, in save
    models.Model.save_base(self.object, raw=True)
  File "C:\Python25\Lib\site-packages\django\db\models\base.py", line 495, in sa
ve_base
    result = manager._insert(values, return_id=update_pk)
  File "C:\Python25\Lib\site-packages\django\db\models\manager.py", line 177, in
 _insert
    return insert_query(self.model, values, **kwargs)
  File "C:\Python25\Lib\site-packages\django\db\models\query.py", line 1087, in
insert_query
    return query.execute_sql(return_id)
  File "C:\Python25\Lib\site-packages\django\db\models\sql\subqueries.py", line
320, in execute_sql
    cursor = super(InsertQuery, self).execute_sql(None)
  File "C:\Python25\Lib\site-packages\django\db\models\sql\query.py", line 2369,
 in execute_sql
    cursor.execute(sql, params)
  File "C:\Python25\Lib\site-packages\django\db\backends\util.py", line 19, in e
xecute
    return self.cursor.execute(sql, params)
  File "C:\Python25\Lib\site-packages\django\db\backends\mysql\base.py", line 84
, in execute
    return self.cursor.execute(query, args)
  File "C:\Python25\Lib\site-packages\MySQLdb\cursors.py", line 166, in execute
    self.errorhandler(self, exc, value)
  File "C:\Python25\Lib\site-packages\MySQLdb\connections.py", line 35, in defau
lterrorhandler
    raise errorclass, errorvalue
IntegrityError: (1452, 'Cannot add or update a child row: a foreign key constrai
nt fails (`leavedemo`.`workflow_activity`, CONSTRAINT `process_id_refs_id_2a8fbd
c0` FOREIGN KEY (`process_id`) REFERENCES `workflow_process` (`id`))')

Original comment by saurav....@gmail.com on 26 Aug 2009 at 4:38