Error on exporting/importing zexp

I am trying to export a copy of a Plone 4 site from production and reimport to my local machine, is the same Plone 4 version and all of the same eggs. It results in a very vague error:

2017-04-21 18:15:51 ERROR Zope.SiteErrorLog 1492812951.160.928464612668 http://localhost:8080    /db33/manage_importObject
Traceback (innermost last):
  Module ZPublisher.Publish, line 60, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module OFS.ObjectManager, line 620, in manage_importObject
  Module OFS.ObjectManager, line 638, in _importObjectFromFile
  Module ZODB.ExportImport, line 92, in importFile
  Module transaction._transaction, line 260, in savepoint
  Module transaction._transaction, line 257, in savepoint
  Module transaction._transaction, line 690, in __init__
  Module ZODB.Connection, line 1123, in savepoint
  Module ZODB.Connection, line 587, in _commit
  Module ZODB.ExportImport, line 176, in _importDuringCommit
  Module copy_reg, line 71, in _reduce_ex
TypeError: object() takes no parameters

I thought this might have been an issue with some new or old style classes, but it is difficult to pinpoint any offending class. If you look at those last two files, "pickler.dump(unpickler.load())" is what ends up calling "_reduce_ex" somehow - I would guess it's doing the work in C in a way that does not play nice in a python traceback. The best I can figure out is the values for self and base in the latter: <zope.interface.declarations.Declaration object at 0x0000000003B836A0> and <type 'interface_coptimizations.SpecificationBase'> respectively (there should be an underscore before interface on that last one, but the editor renders it in italics)

Yuck. I also just tried doing a copy/paste of the Plone site in the ZMI and it results in the same error (not surprisingly). I was hoping it would be a matter of removing old content or an old tool, but if that's the blocker I don't know how to find it.

to find out where it comes from, maybe you could try.

  1. make a new plone site
  2. Copy the content from your site to the new site

if it fails:
2) Copy half of the content from your site to the new site, see if that works, then half of what is 'left' until you are left with one (or a few) content item(s).

Good call, I was thinking it was a problem with the Plone object itself (perhaps something with the local zope.component site manager) but I did track down a problem this way. Looks like it's another flavor of this ol' thing https://www.fourdigits.nl/blog/how-to-break-your-plone-site-with-implementedby/

1 Like