[Cubicweb] cw migration from 3.10.8 to 3.10.9

Sylvain Thénault sylvain.thenault at logilab.fr
Thu Mar 3 15:01:25 CET 2011

On 03 mars 07:54, Carlos Balderas wrote:
> Hi List!

Hey Carlos,
> I have an instance which I'd like to migrate to cw 3.10.9 version.
> At the time to execute the question, "fix existing cwuir?"
> I get this error:
> Execute
> '/home/carlos/src/fcubicweb/cubicweb/misc/migration/bootstrapmigration_repository.py'
> ? [Y/n/s(how)/a(bort)]:
> Execute '/home/carlos/src/fcubicweb/cubicweb/misc/migration/3.10.9_Any.py' ?
> [Y/n/s(how)/a(bort)]:
> fix existing cwuri? [Y/n/a(bort)/s(hell)]:
> [....................................................................
> ]Traceback (most recent call last):
>   File "/home/carlos/src/fcubicweb/cubicweb/cwctl.py", line 161, in run_arg
>     status = cmdmeth(appid)
>   File "/home/carlos/src/fcubicweb/cubicweb/hooks/syncschema.py", line 681,
> in precommit_event
>     rdefentity = self.entity.reverse_constrained_by[0]
> IndexError: tuple index out of range
> I could you please give me clue about what could be happening here?. =)

I encountered the same problem while migrating some of our apps: it happeared
that the database held some buggy constraint entities which weren't related to
any schema entity (hence not respecting schema cardinality). I dunno how, and 
should investigate. In the mean time, you can still remove them prior to do
the migration:

when asked "fix existing cwuri", type 's' (shell)
then drop buggy constraint with "rql('DELETE CWConstraint X WHERE NOT E constrained_by X')"
then commit()
then quit the shell (Ctrl-D)

Sylvain Thénault                               LOGILAB, Paris (France)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org

More information about the Cubicweb mailing list