Mailing List Archive

tracdb2env error
The migrate script worked for two other projects on my server, but on
one of them (of course, the most active project), I receive the
following error:


Traceback (most recent call last):
File "/usr/local/bin/tracdb2env", line 102, in ?
db2env(sys.argv[1], sys.argv[2])
File "/usr/local/bin/tracdb2env", line 26, in db2env
convert_db(old_cursor, new_cursor)
File "/usr/local/bin/tracdb2env", line 81, in convert_db
copy_tuples('permission', old_cursor, new_cursor)
File "/usr/local/bin/tracdb2env", line 68, in copy_tuples
to_cursor.execute('INSERT INTO %s VALUES(%s)' \
File "/usr/local/lib/python2.1/site-packages/sqlite/main.py", line
255, in execute
self.rs = self.con.db.execute(SQL % parms)
_sqlite.IntegrityError: constraint failed


Any ideas?

.josh
tracdb2env error [ In reply to ]
No one has any insight on this problem? :(

Josh Burley wrote:

> The migrate script worked for two other projects on my server, but on
> one of them (of course, the most active project), I receive the
> following error:
>
>
> Traceback (most recent call last):
> File "/usr/local/bin/tracdb2env", line 102, in ?
> db2env(sys.argv[1], sys.argv[2])
> File "/usr/local/bin/tracdb2env", line 26, in db2env
> convert_db(old_cursor, new_cursor)
> File "/usr/local/bin/tracdb2env", line 81, in convert_db
> copy_tuples('permission', old_cursor, new_cursor)
> File "/usr/local/bin/tracdb2env", line 68, in copy_tuples
> to_cursor.execute('INSERT INTO %s VALUES(%s)' \
> File "/usr/local/lib/python2.1/site-packages/sqlite/main.py", line
> 255, in execute
> self.rs = self.con.db.execute(SQL % parms)
> _sqlite.IntegrityError: constraint failed
>
>
> Any ideas?
>
> .josh
>
>
> _______________________________________________
> Trac mailing list
> Trac@lists.edgewall.com
> http://lists.edgewall.com/mailman/listinfo/trac
tracdb2env error [ In reply to ]
Josh Burley <jburley@kuci.org> [2004-09-20T12:25]:
> No one has any insight on this problem? :(
[...]
> >Traceback (most recent call last):
> > File "/usr/local/bin/tracdb2env", line 102, in ?
> > db2env(sys.argv[1], sys.argv[2])
> > File "/usr/local/bin/tracdb2env", line 26, in db2env
> > convert_db(old_cursor, new_cursor)
> > File "/usr/local/bin/tracdb2env", line 81, in convert_db
> > copy_tuples('permission', old_cursor, new_cursor)
> > File "/usr/local/bin/tracdb2env", line 68, in copy_tuples
> > to_cursor.execute('INSERT INTO %s VALUES(%s)' \
> > File "/usr/local/lib/python2.1/site-packages/sqlite/main.py", line
> >255, in execute
> > self.rs = self.con.db.execute(SQL % parms)
> >_sqlite.IntegrityError: constraint failed

Check the list archives -- I recall something about duplicate entries in
the permission list violating newly added constraints. If `permission
list` in trac-admin shows duplicate entries, this could likely be your
problem (use trac-admin from the old version).

If this was indeed your problem, you could add the solution to the Trac
FAQ :)

Cheers
Dan

--
Daniel Roethlisberger <daniel@roe.ch>
GnuPG Key ID 0x804A06B1 (DSA/ElGamal)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : /archive/trac/attachments/20040920/3a2fb279/attachment.pgp
tracdb2env error [ In reply to ]
I was unable to find anything like that in the archives, but your guess
at permissions was correct.

There were no actual duplicates in the permission list, but one user was
set to TRAC_ADMIN as well as some other roles. I added some debug
statements on the INSERTS, removed TRAC_ADMIN, and it ran fine.

Thanks for your help!

.josh

Daniel Roethlisberger wrote:

>Josh Burley <jburley@kuci.org> [2004-09-20T12:25]:
>
>
>>No one has any insight on this problem? :(
>>
>>
>[...]
>
>
>>>Traceback (most recent call last):
>>>File "/usr/local/bin/tracdb2env", line 102, in ?
>>> db2env(sys.argv[1], sys.argv[2])
>>>File "/usr/local/bin/tracdb2env", line 26, in db2env
>>> convert_db(old_cursor, new_cursor)
>>>File "/usr/local/bin/tracdb2env", line 81, in convert_db
>>> copy_tuples('permission', old_cursor, new_cursor)
>>>File "/usr/local/bin/tracdb2env", line 68, in copy_tuples
>>> to_cursor.execute('INSERT INTO %s VALUES(%s)' \
>>>File "/usr/local/lib/python2.1/site-packages/sqlite/main.py", line
>>>255, in execute
>>> self.rs = self.con.db.execute(SQL % parms)
>>>_sqlite.IntegrityError: constraint failed
>>>
>>>
>
>Check the list archives -- I recall something about duplicate entries in
>the permission list violating newly added constraints. If `permission
>list` in trac-admin shows duplicate entries, this could likely be your
>problem (use trac-admin from the old version).
>
>If this was indeed your problem, you could add the solution to the Trac
>FAQ :)
>
>Cheers
>Dan
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Trac mailing list
>Trac@lists.edgewall.com
>http://lists.edgewall.com/mailman/listinfo/trac
>
>