[Zope] Problems importing

Peter Bengtsson mail@peterbe.com
Fri, 20 Jul 2001 15:55:10 +0200


That error occurs when you're trying to import a Product in anywhere else
than the product folder or when you are sometimes trying to import objects
that contain "broken objects". (broken objects are objects where the
meta_type isn't recognized).

I once exported some simple objects in a Zope 2.3.0 and got the same import
error in Zope 2.3.3 like you had.
So I tried to import it programmatically from an External Method and that
worked.

I don't know why it worked but I have a qualified guess.
External Methods don't give a damn about Zope security and there is a
difference in the security in Zope 2.3.0 and Zope 2.3.3

so, create a function:

def importit(self,name):
     self.manage_importObjects([name])
     return "done"

and create an External Method to this and run.

Good luck,

Peter


----- Original Message -----
From: "Danni Efraim" <daml@galdrion.com>
To: <zope@zope.org>
Sent: Friday, July 20, 2001 1:11 PM
Subject: [Zope] Problems importing


> Hi!
>
> I've got a problem that's bothering me no end.
>
> I'm trying to import a file (gskolan.zexp) exported from Zope 2.3.0 into
my
> 2.3.3, but I keep getting the following message:
>
> "The object gskolan does not support this operation."
>
> I ran this through the Wing debugger to try to figure out where things go
> wrong, because the Zope debug output only told me the error was in
> "_verifyObjectPaste".
>
> First, I get a KeyError exception in ZPublisher/HTTPRequest.py, line 884,
> method __getitem__ of class HTTPRequest. The value of the variable key at
> this time is "__nonzero__".
>
> The exception generating the message I see is located at
OFS/CopySupport.py,
> line 440, method _verifyObjectPaste of class CopyContainer.
>
> Interesting data:
> meta_types = ({'name': 'Product', 'action': 'manage_addProductForm'},)
> mt = "Folder"
> method_name = None
>
> What happens is that the exception is reached because method_name is None,
> which in turn happens because none of the entries in meta_types has a
> ['name'] that is "Folder". The only that exists is "Product"! Does this
mean
> I can only import products this way?
>
> Because of the KeyError exception, I grepped the documentation for
> "__nonzero__" and found a bugfix mentioning it from 2.3.1. Could this
whole
> thing be occuring because I'm importing a file exported from 2.3.0 to a
> 2.3.3? I don't have access to the 2.3.0 server to upgrade it. Maybe I
could
> try installing a 2.3.0, importing, upgrading and then exporting.
>
> I'd be very thankful for any feedback on this problem!
>
> /Danni
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )