Hi,

I'm using Pootle version 2.1.0 using sqlite. As I have more an more
users, language and projects to manage, I'd like to use MySQL instead
of sqlite.

So I followed this documentation:
http://translate.sourceforge.net/wiki/pootle/database_migration


All the steps are OK untill the step 6: ./manage.py loaddata ./data.json


Here is the dump:

====
translat...@host:~/test/Pootle-2.1.0$ ./manage.py loaddata ./data.json
Installing json fixture './data' from absolute path.
Problem installing fixture './data.json': Traceback (most recent call last):
  File 
"/usr/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/core/management/commands/loaddata.py",
line 169, in handle
    obj.save(using=using)
  File 
"/usr/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/core/serializers/base.py",
line 165, in save
    models.Model.save_base(self.object, using=using, raw=True)
  File 
"/usr/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/base.py",
line 528, in save_base
    result = manager._insert(values, return_id=update_pk, using=using)
  File 
"/usr/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/manager.py",
line 195, in _insert
    return insert_query(self.model, values, **kwargs)
  File 
"/usr/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/query.py",
line 1479, in insert_query
    return query.get_compiler(using=using).execute_sql(return_id)
  File 
"/usr/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/sql/compiler.py",
line 783, in execute_sql
    cursor = super(SQLInsertCompiler, self).execute_sql(None)
  File 
"/usr/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/sql/compiler.py",
line 727, in execute_sql
    cursor.execute(sql, params)
  File 
"/usr/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/backends/mysql/base.py",
line 86, in execute
    return self.cursor.execute(query, args)
  File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line
166, in execute
    self.errorhandler(self, exc, value)
  File "/var/lib/python-support/python2.5/MySQLdb/connections.py",
line 35, in defaulterrorhandler
    raise errorclass, errorvalue
IntegrityError: (1062, "Duplicate entry 'pootle_language-language' for key 2")

translat...@host:~/test/Pootle-2.1.0$
====


The MySQL structure is OK because the manage.py syncdb worked
succefully and I see the tables structure.

So what happens ? Did i forgot to do something ?


Thanks,

-- 
             Julien

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Translate-pootle mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to