3.1.1-3.2.1 migration problem

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

3.1.1-3.2.1 migration problem

Juan Herrera
Hi. When migrating 3.1.1 to 3.2.1, I'm getting this error for a folder:
  KeyError: <LanguageIndex.IndexEntry id -1420325982 language es, cid
  2beaedca3c2fcda015f3cccbb7c6f7de> 

The site's language is Spanish.

Log follows:

MigrationError for obj at /ocweafit/ingenieria-de-diseno-de-producto/microcontroladores-primer-semestre-2008 (Course -> Folder): Traceback (most recent call last):
File "/opt/Zope-2.10.8/Extensions/Products/contentmigration/basemigrator/walker.py", line 174, in migrate migrator.migrate()
File "/opt/Zope-2.10.8/Extensions/Products/contentmigration/basemigrator/migrator.py", line 192, in migrate self.renameOld()
File "/opt/Zope-2.10.8/Extensions/Products/contentmigration/basemigrator/migrator.py", line 438, in renameOld unrestricted_rename(self.parent, self.orig_id, self.old_id)
File "/opt/Zope-2.10.8/Extensions/Products/contentmigration/common.py", line 118, in unrestricted_rename self._delObject(id)
File "/opt/Zope-2.10.8/lib/python/OFS/ObjectManager.py", line 398, in _delObject notifyContainerModified(self)
File "/opt/Zope-2.10.8/lib/python/zope/app/container/contained.py", line 365, in notifyContainerModified notify(ContainerModifiedEvent(object, *descriptions))
File "/opt/Zope-2.10.8/lib/python/zope/event/__init__.py", line 23, in notify subscriber(event)
File "/opt/Zope-2.10.8/lib/python/zope/component/event.py", line 26, in dispatch for ignored in zope.component.subscribers(event, None):
File "/opt/Zope-2.10.8/lib/python/zope/component/_api.py", line 130, in subscribers return sitemanager.subscribers(objects, interface)
File "/opt/Zope-2.10.8/lib/python/zope/component/registry.py", line 290, in subscribers return self.adapters.subscribers(objects, provided)
File "/opt/Zope-2.10.8/lib/python/zope/interface/adapter.py", line 535, in subscribers subscription(*objects)
File "/opt/Zope-2.10.8/lib/python/zope/component/event.py", line 33, in objectEventNotify adapters = zope.component.subscribers((event.object, event), None)
File "/opt/Zope-2.10.8/lib/python/zope/component/_api.py", line 130, in subscribers return sitemanager.subscribers(objects, interface)
File "/opt/Zope-2.10.8/lib/python/zope/component/registry.py", line 290, in subscribers return self.adapters.subscribers(objects, provided)
File "/opt/Zope-2.10.8/lib/python/zope/interface/adapter.py", line 535, in subscribers subscription(*objects)
File "/opt/Zope-2.10.8/web/Products/eduCommons/events.py", line 78, in reindexOnReorder obj.reindexObject()
File "/opt/Zope-2.10.8/web/Products/Archetypes/CatalogMultiplex.py", line 114, in reindexObject c.catalog_object(self, url, idxs=lst)
File "/opt/Zope-2.10.8/web/Products/CMFPlone/CatalogTool.py", line 385, in catalog_object update_metadata, pghandler=pghandler)
File "/opt/Zope-2.10.8/lib/python/Products/ZCatalog/ZCatalog.py", line 536, in catalog_object update_metadata=update_metadata)
File "/opt/Zope-2.10.8/lib/python/Products/ZCatalog/Catalog.py", line 361, in catalogObject blah = x.index_object(index, object, threshold)
File "/opt/Zope-2.10.8/web/Products/LinguaPlone/LanguageIndex.py", line 149, in index_object self._remove(self._unindex[documentId])
File "/opt/Zope-2.10.8/web/Products/LinguaPlone/LanguageIndex.py", line 270, in _remove self._index[entry.main][entry.sub].remove(entry)
KeyError: <LanguageIndex.IndexEntry id -1420325982 language es, cid 2beaedca3c2fcda015f3cccbb7c6f7de>

Traceback (innermost last):

    * Module ZPublisher.Publish, line 119, in publish
    * Module ZPublisher.mapply, line 88, in mapply
    * Module ZPublisher.Publish, line 42, in call_object
    * Module Products.ExternalMethod.ExternalMethod, line 231, in __call__
      __traceback_info__: ((<PloneSite at /ocweafit>,), {}, None)
    * Module /opt/Zope-2.10.8/Extensions/PreMigrate.py, line 134, in pre_migrate_3_1_1_to_3_2_1
    * Module Products.contentmigration.basemigrator.walker, line 126, in go
    * Module Products.contentmigration.basemigrator.walker, line 205, in migrate

The same error appears for all folders (when I remove one by one, it keeps appearing.)

I would greatly appreciate your help.

Thanks,

Juan Herrera
Universidad EAFIT
Medellin, Colombia
Reply | Threaded
Open this post in threaded view
|

Re: 3.1.1-3.2.1 migration problem

Juan Herrera
Seems this is a problem with linguaplone. Here's the ticket:
    http://plone.org/products/linguaplone/issues/177
It seems it was only solved recently (Sept 25.)

Could I solve it by replacing /opt/Zope-2.10.8/web/Products/LinguaPlone/LanguageIndex.py with a more recent version?

(Would like your opinion before I mess my system.)

Thanks,

Juan
Reply | Threaded
Open this post in threaded view
|

Re: 3.1.1-3.2.1 migration problem

Juan Herrera
Ok, I might have solved it.

I looked at LanguageIndex.py on
http://svn.plone.org/svn/plone/Products.LinguaPlone/trunk/Products/LinguaPlone/LanguageIndex.py

I made the following modification:

  LOG = getLogger('LinguaPlone.LanguageIndex')
+ _marker = object()
...
      def _remove(self, entry):
+         main = self._index.get(entry.main, _marker)
+         if main is _marker:
+             return
+
+         if entry in self._index[entry.main][entry.sub]:
              self._index[entry.main][entry.sub].remove(entry)
+         else:
+             LOG.warning("entry %s existed in _unindex but not in _index." % str(entry))

I no longer get the error.

Regards,

Juan
Reply | Threaded
Open this post in threaded view
|

Re: 3.1.1-3.2.1 migration problem

Tom Caswell
Thanks for looking into this Juan. Please do let us know if you solve the other error as well.

Best regards,

Tom
--
Tom Caswell
Open Education Consultant
http://tomcaswell.com/consulting

Tom Caswell
http://tomcaswell.com
Open Education Consultant
Reply | Threaded
Open this post in threaded view
|

Re: 3.1.1-3.2.1 migration problem

Juan Herrera
Oh yes I did. The migration was failing because there were a few objects with locks. It went all smooth after that :)

Regards

Juan