Puzzling Import/Export problem
A friend in Russia is still using my old ZClasses QSurvey product. He is attempting to copy an installation from one machine to another, and upgrade Zope to 2.6.4. Exporting the product and instances works fine, but some object instances will not import correctly. A product instance is a folderish object that contains other objects. One particular folderish subobject will not import correctly; all the others import fine. The .zexp of the entire product instance, with subitems, etc., imports OK, but the one folderish object shows up as "broken" in the ZMI. Exporting that object as XML and reimporting after correcting the appropriate class ID string results in a "BadPickleGet" error 7. Traceback (innermost last): Module ZPublisher.Publish, line 113, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 40, in call_object Module OFS.ObjectManager, line 561, in manage_importObject Module OFS.ObjectManager, line 578, in _importObjectFromFile Module ZODB.ExportImport, line 65, in importFile Module OFS.XMLExportImport, line 119, in importXML Module ZODB.ExportImport, line 75, in importFile Module transaction._transaction, line 368, in commit Module transaction._transaction, line 297, in savepoint Module transaction._transaction, line 294, in savepoint Module transaction._transaction, line 656, in __init__ Module ZODB.Connection, line 1034, in savepoint Module ZODB.Connection, line 470, in _commit Module ZODB.ExportImport, line 140, in _importDuringCommit BadPickleGet: 7 I have examined the xml export, and the only thing I can think of that might be a problem is that some of the object IDs for some contained items are base64-encoded and may contain Russian characters. But that does not seem to be the problem, since a similar, smaller import with only ascii characters fails with the same traceback and BadPickleGet:10. I realize that this might be an uninteresting edge-case. My backup plan is to write a script to pull the data out of the XML export and recreate the objects. Does anyone have any pointers on that? I am having trouble figuring out how that file is organized. For completeness, I am using zope-2.8.0, but this happens on 2.7.6 as well. -Jim Washington
Jim Washington wrote at 2005-7-23 16:09 -0400:
He is attempting to copy an installation from one machine to another, and upgrade Zope to 2.6.4.
Exporting the product and instances works fine, but some object instances will not import correctly.
Usually, it is much safer to just copy the storage file(s). Export/Import is known to fail with ZClasses that inherit from other ZClasses defined in a different product (which probably is not your case).
A product instance is a folderish object that contains other objects. One particular folderish subobject will not import correctly; all the others import fine. The .zexp of the entire product instance, with subitems, etc., imports OK, but the one folderish object shows up as "broken" in the ZMI.
This usually means that its class could not be imported. Have a look at Zope's "ClassFactory" and check why it is unable to import/load the ZClass. -- Dieter
participants (2)
-
Dieter Maurer -
Jim Washington