[Zope] AttributeError: __getitem__ when migrating zope from 2.6.1 to 2.10.5

Tres Seaver tseaver at palladion.com
Tue Nov 11 11:54:08 EST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

peter pilsl wrote:
> I'm a total newbie to Zope and have to face the task to migrate a old 
> and chaotic 2.6.1.-Zope-setup from an old server to a new Server with 
> Zope 2.10.
> 
> What I did until now
> 
> * created a new instance on the new server with mkzopeinstance.py
> * copied the old Data.fs to the var-subfolder of the new instance
> * started the new zope
> * I can login to the new zope-managment and see all the old stuff, old 
> users etc.
> 
> but I've two problems (and I dont know if they are related)
> 
> Problem 1)
> 
> when accessing Zope outside the managment-tree I get the following error:
> 
> Site Error
> 
> An error was encountered while publishing this resource.
> 
> AttributeError
> Sorry, a site error occurred.
> 
> Traceback (innermost last):
> 
>      * Module ZPublisher.Publish, line 202, in publish_module_standard
>      * Module ZPublisher.Publish, line 150, in publish
>      * Module Zope2.App.startup, line 221, in zpublisher_exception_hook
>      * Module ZPublisher.Publish, line 110, in publish
>      * Module ZPublisher.BaseRequest, line 578, in traverse
>      * Module ZPublisher.BaseRequest, line 683, in old_validation
> 
> AttributeError: __getitem__ (Also, the following error occurred while 
> attempting to render the standard error message, please see the event 
> log for full details: You are not allowed to access 
> 'standard_html_header' in this context)
> 
> the logfiles says:
> 
> ------
> 2008-11-11T16:18:36 ERROR Zope.SiteErrorLog 
> http://intranet2.parlament.gruene.at:8080/intranet/gkcms/index_html
> Traceback (innermost last):
>    Module ZPublisher.Publish, line 110, in publish
>    Module ZPublisher.BaseRequest, line 578, in traverse
>    Module ZPublisher.BaseRequest, line 683, in old_validation
> AttributeError: __getitem__

You may need to do surgery on your old userfolder here:  it is the
'groups' object in that method, and apparently has a 'has_key' method
but not a '__getitem__'.  I would set a breakpoint in the
'old_validation' method and watch it fail.

If you look at the user folder(s) in your site via the ZMI, what type
are they?  (they will have the name 'acl_users' in their folder).

> Problem 2) (maybe same source then problem 1)
> 
> In the old zope there are a load of "Products" which I can see in the 
> managment-interface and the files seems to be installed under 
> lib/python/Products.  On the new server there are two folders called 
> Products: INSTANCENAME/lib/python/Products like on the old and 
> INSTANCENAME/Products. I can see the products on the new server as well 
> even they dont seem to be installed.
> 
> Do I need to copy the files from the old Zope to the new one? To which 
> folder? Or do I need to install the products from the scratch? (I didnt 
> find out how to install these "products". They can be downloaded as 
> tgz-packages and I dont know if I simply have to copy them to one of the 
> mentioned Products-folder or register them somehow in Zope.

For any package in the old server's $SOFTWARE_HOME/lib/python/Products:

 - If a package with the same name is in the new server's
   $SOFTWARE_HOME/lib/python/Products, that means that it shipss
   with Zope itself;  you should not need to do anything.

 - Otherwise, try copying the old package into $INSTANCE_HOME/Products.
   You may have to update or patch the copied products to get them to
   work under Zope 2.10.

> thnx for any hints on how to procede.



- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJGbiw+gerLs4ltQ4RAjVqAJ4qmKo4PEDo5OCLXvQf+DgpVflt4gCffEo0
d6OcfMOSf1yP0Zp+h5o8n/M=
=dPWt
-----END PGP SIGNATURE-----



More information about the Zope mailing list