Pre-Migrate Problems

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

Pre-Migrate Problems

oriolUPM

Hello David,

How do you comment on another message I will continue here. I repeat the question in case anyone has not read the other message.

We are trying to migrate eduCommons version from 2.3.1 to 3.1.1. but we are having many problems.

We have not succeeded the Pre-Migration Data.fs in version 2.3.1 because when we run the pre-migration script have many errors. The errors are due to changes, for example the ECCourse-->Folder, ECDocument-->Document, ECFolder-->Folder, ECLink-->Link, ...

We do not know what to do.

We try to eliminate all objects that produce error, but in the end we were left with only 3 courses that do not give error.

We are following step by step the migration instructions.

You asked me, on the other messsage:

"Is the traceback you provided the *initial* error that you receive when running the Pre_Migrate_eduCommons3.0.2 script? If not, could you please provide that traceback?"

The traceback we write in the other post was referring to the migration script.

The traceback that comes when you run the script as follows:

An error was encountered while publishing this resource.
MigrationError

MigrationError for obj at /ocwupm/historia-de-la-ciencia/historia-de-las-telecomunicaciones/contenidos/radio_television/satelitesdecomunicaciones.htm (ECDocument -> Document): Traceback (most recent call last): File "/usr/local/edu231/Products/ATContentTypes/migration/walker.py", line 174, in migrate migrator.migrate() File "/usr/local/edu231/Products/ATContentTypes/migration/migrator.py", line 190, in migrate self.renameOld() File "/usr/local/edu231/Products/ATContentTypes/migration/migrator.py", line 429, in renameOld unrestricted_rename(self.parent, self.orig_id, self.old_id) File "/usr/local/edu231/Products/ATContentTypes/migration/common.py", line 124, in unrestricted_rename self._setObject(new_id, ob, set_owner=0) File "/usr/local/Zope-2.9.7/lib/python/OFS/ObjectManager.py", line 333, in _setObject notify(ObjectAddedEvent(ob, self, id)) File "/usr/local/Zope-2.9.7/lib/python/zope/event/__init__.py", line 23, in notify subscriber(event) File "/usr/local/Zope-2.9.7/lib/python/zope/app/event/dispatching.py", line 66, in dispatch for ignored in subscribers(event, None): File "/usr/local/Zope-2.9.7/lib/python/zope/component/__init__.py", line 181, in subscribers return sitemanager.subscribers(objects, interface) File "/usr/local/Zope-2.9.7/lib/python/zope/component/site.py", line 89, in subscribers return self.adapters.subscribers(required, provided) File "/usr/local/Zope-2.9.7/lib/python/zope/interface/adapter.py", line 481, in subscribers subscribers = [subscription(*objects) File "/usr/local/Zope-2.9.7/lib/python/zope/app/event/objectevent.py", line 192, in objectEventNotify adapters = subscribers((event.object, event), None) File "/usr/local/Zope-2.9.7/lib/python/zope/component/__init__.py", line 181, in subscribers return sitemanager.subscribers(objects, interface) File "/usr/local/Zope-2.9.7/lib/python/zope/component/site.py", line 89, in subscribers return self.adapters.subscribers(required, provided) File "/usr/local/Zope-2.9.7/lib/python/zope/interface/adapter.py", line 481, in subscribers subscribers = [subscription(*objects) File "/usr/local/Zope-2.9.7/lib/python/OFS/subscribers.py", line 114, in dispatchObjectMovedEvent callManageAfterAdd(ob, event.object, event.newParent) File "/usr/local/Zope-2.9.7/lib/python/OFS/subscribers.py", line 137, in callManageAfterAdd ob.manage_afterAdd(item, container) File "/usr/local/edu231/Products/ATContentTypes/content/document.py", line 220, in manage_afterAdd ATCTContent.manage_afterAdd(self, item, container) File "/usr/local/edu231/Products/Archetypes/BaseContent.py", line 42, in manage_afterAdd CatalogMultiplex.manage_afterAdd(self, item, container) File "/usr/local/edu231/Products/CMFCore/CMFCatalogAware.py", line 202, in manage_afterAdd self.indexObject() File "/usr/local/edu231/Products/Archetypes/CatalogMultiplex.py", line 36, in indexObject c.catalog_object(self, url) File "/usr/local/edu231/Products/CMFPlone/CatalogTool.py", line 357, in catalog_object update_metadata, pghandler=pghandler) File "/usr/local/Zope-2.9.7/lib/python/Products/ZCatalog/ZCatalog.py", line 567, in catalog_object update_metadata=update_metadata) File "/usr/local/Zope-2.9.7/lib/python/Products/ZCatalog/Catalog.py", line 360, in catalogObject blah = x.index_object(index, object, threshold) File "/usr/local/Zope-2.9.7/lib/python/Products/ZCTextIndex/ZCTextIndex.py", line 187, in index_object text = text() File "/usr/local/edu231/Products/Archetypes/BaseObject.py", line 534, in SearchableText datum = method(mimetype="text/plain") File "/usr/local/edu231/Products/Archetypes/ClassGen.py", line 58, in generatedAccessor return schema[name].get(self, **kw) File "/usr/local/edu231/Products/Archetypes/Field.py", line 1295, in get encoding=kwargs.get('encoding',None)) File "/usr/local/edu231/Products/Archetypes/BaseUnit.py", line 87, in transform orig = self.getRaw(encoding, instance) File "/usr/local/edu231/Products/Archetypes/BaseUnit.py", line 179, in getRaw return self.raw.encode(encoding) File "encodings/cp1252.py", line 18, in encode UnicodeEncodeError: 'charmap' codec can't encode character u'\x89' in position 186: character maps to (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: portal_type)Traceback (innermost last): Module ZPublisher.Publish, line 196, in publish_module_standard Module Products.PlacelessTranslationService.PatchStringIO, line 34, in new_publish Module ZPublisher.Publish, line 146, in publish Module Zope2.App.startup, line 222, in zpublisher_exception_hook Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module Products.ExternalMethod.ExternalMethod, line 225, in __call__ - __traceback_info__: ((,), {}, None) Module /usr/local/edu231/Products/eduCommons/Extensions/PreMigrate.py, line 298, in pre_migrate_2_3_1_to_3_0_4 Module Products.ATContentTypes.migration.walker, line 126, in go Module Products.ATContentTypes.migration.walker, line 205, in migrate MigrationError: (see above)

This error not only occurs with documents as well as other objects: links or courses.

What you think that is the problem?

Thanks!

--
Oriol Borrás Gené
GATE - UPM

Reply | Threaded
Open this post in threaded view
|

Re: Pre-Migrate Problems

David Ray
Administrator
There should be a 'reply' link to comment on a comment.  

Looking through the traceback, it appears that a unicode error is being thrown somewhere during the process of getting data for each object.  

"in getRaw return self.raw.encode(encoding) File "encodings/cp1252.py", line 18, in encode UnicodeEncodeError: 'charmap' codec can't encode character u'\x89' in position 186: "

I wonder if it would be possible for you to zip download the course that contains that file 'encodings/cp1252.py'.  I have a migration environment set up; if I had the course contents, I could better isolate and debug the problem.

david@enpraxis.net
---------------------
David Ray
Applications Analyst
Lineberger Comprehsensive Cancer Center
University of North Carolina at Chapel Hill
Reply | Threaded
Open this post in threaded view
|

Re: Pre-Migrate Problems

Shaun@UMB
Pre-migration: I am seeing a similar problem when trying to do a few things on our site. When trying to do an IMS export of courses, I get a "UnicodeEncodeError".

Looking through the traceback:

Exception Type UnicodeEncodeError
Exception Value 'ascii' codec can't encode character u'\u201c' in position 750: ordinal not in range(128)
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 zope.formlib.form, line 769, in __call__
Module Products.Five.formlib.formbase, line 55, in update
Module zope.formlib.form, line 750, in update
Module zope.formlib.form, line 594, in success
Module Products.IMSTransport.browser.imstransportform, line 174, in action_export
Module Products.IMSTransport.utilities.utils, line 68, in exportZipfile
Module Products.IMSTransport.Manifest, line 122, in writeManifest
Module Products.IMSTransport.Manifest, line 167, in _writeObjectData
Module Products.IMSTransport.Manifest, line 305, in writeFile
Module zipfile, line 460, in writestr
UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c' in position 750: ordinal not in range(128)

I can zip download the course, but I cannot IMS export it.
Reply | Threaded
Open this post in threaded view
|

Re: Pre-Migrate Problems

username
The problem can be solved by enabling the "default-zpublisher_encoding utf-8" to render the characters of other languages.
Reply | Threaded
Open this post in threaded view
|

Re: Pre-Migrate Problems

Mohammad Qatrawi
How can I enabled default-zpublisher_encoding utf-8