KeyError: '@id' using collective.exportimport

Hi,

I'm importing data from another Plone 5.2.10.2 instance with the same products and versions. All of the content has imported happily, but the "metadata" exports (default docs, position in folder, portlets etc.) are all failing with this error.

The thing that baffles me is that this content was imported into its current instance in exactly the same way - I'm unable to identify a difference in products, versions or process.

The lack of hits when Googling the problem suggests to me that I'm doing something daft - can anyone help me understand what?

--

PhilK

It's hard to diagnose what's wrong from just the error message with no stack traceback. Can you show the full stack trace from the Zope logs?

Hi David,

The traceback on screen and in the event log is: -

Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 167, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 376, in publish_module
Module ZPublisher.WSGIPublisher, line 271, in publish
Module ZPublisher.mapply, line 85, in mapply
Module ZPublisher.WSGIPublisher, line 63, in call_object
Module collective.exportimport.import_content, line 184, in call
Module collective.exportimport.import_content, line 249, in do_import
Module collective.exportimport.import_content, line 299, in import_new_content
KeyError: '@id'

HTH

Hi,

The thing that baffles me is that this content was imported into its
current instance in exactly the same way - I'm unable to identify a
difference in products, versions or process.

The lack of hits when Googling the problem suggests to me that I'm doing
something daft - can anyone help me understand what?

It was indeed something daft!

The non-content exports offer a choice of whether to download the JSON
to the local machine or save to a file on the server.

In the import step, there is a "universal" form for uploading various
sorts of content, and separate import forms for each sort of metadata,
none of which allow the use of files on the server.

Needless to say, the difference is that when I have not been paying
sufficient attention, given that all my files were on the server, I have
been attempting to use the content form for metadata. Doing all the
content import export on the server, but using the local machine for the
metadata imports and exports works fine.

I feel like a lemon now, but hopefully this note will save someone else
a little time.

:slight_smile: