[Zope3-Users] Evolution of ZoDB after changing python modules structure (moving content classes to another module)

Alek Kowalczyk thealx at poczta.onet.pl
Wed Jun 6 13:00:40 EDT 2007


Hi,

I have just done some slight refactoring of my code. Ok, it's not even
refactoring, just a tree structure cleanup.

I moved my content class from mypackage.mymodule.MyContentClass into
mypackage.mysubpackage.mymodule.MyContentClass.

I changed all the paths in imports and Unit Tests work again.

But when started Zope and went to visit an object I have previously created (of
MyContentClass), I get:
ComponentLookupError: ((<persistent broken mypackage.mymodule.MyContentClass
instance '\x00\x00\x00\x00\x00\x00\x02q'>,
<zope.publisher.browser.BrowserRequest instance
URL=http://localhost:8080/++skin++MySkin/SomeFolder/SomeFolder/ObjectOfMyContentClass/@@index.html>),
<InterfaceClass zope.interface.Interface>, 'index.html')

I'm already familiar with generations - I've done two up to now. I guess I
should somehow evolve the ZoDB to 'rename' paths.to.RelocatedClasses.

But I don't know how to do that?




More information about the Zope3-users mailing list