Re: [Zope-dev] nasty persistence problem
Michel Pelletier wrote: Tim McLaughlin wrote: Thanks Chris, I'll hold on to that for a rainier day. I just worked this one out in a very roundabout way ;) A product had gotten copied in that moved a Product class from one module to another even though everything else was the same. It seems that ZODB doesn't like that. It sure doesn't. When it pickles an object, it says, here's a big binary blob that is the state of the object. The code for the object can be found in Products.MyProduct.MyModule.MyClass. When you move the code, ZODB understandably barfs. Shane's latest atch help here: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/zodbex/zodbex/ - ChangeModules will let you change the module and name of persisted class instances. This could be very beneficial when you have to change the name of a product. cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] nasty persistence problem
Tim McLaughlin wrote: Thanks Chris, I'll hold on to that for a rainier day. I just worked this one out in a very roundabout way ;) A product had gotten copied in that moved a Product class from one module to another even though everything else was the same. It seems that ZODB doesn't like that. It sure doesn't. When it pickles an object, it says, here's a big binary blob that is the state of the object. The code for the object can be found in Products.MyProduct.MyModule.MyClass. When you move the code, ZODB understandably barfs. If I remember correctly, there is a way to make an alias in an old location that points to a new location when you *must* move the code for whatever reason. I forget how it works though... -Michel ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] nasty persistence problem
do this in the debugger: import Zope app = Zope.app() app.fixupZClassDependencies(rebuild=1) get_transaction().commit() exit the debugger and restart, see what happens. - Original Message - From: Tim McLaughlin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 12, 2001 10:29 AM Subject: [Zope-dev] nasty persistence problem I seem to be in a bad spot. When I restarted Zope after modifying some products, I got a Could not load oid.. for all URLs. Basically, the only way I could even access anything was by doing an import Zope in the Python interpreter and deleting acl_users which is an instance of LoginManager. And now I found out (once I was able to login to ZMI) that two vital ZClasses are broken also. So, I'm kinda stuck. Here's the error: Error Type: Could not load oid ~, pickled data in traceback info may contain clues Error Value: None Here's the traceback if it helps... Traceback (innermost last): File /zope/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /zope/lib/python/Zope/__init__.py, line 226, in zpublisher_exception_hook (Object: LockableItem) File /zope/lib/python/ZPublisher/Publish.py, line 171, in publish File /zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_main) File /zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: manage_main) File /zope/lib/python/Shared/DC/Scripts/Bindings.py, line 324, in __call__ (Object: manage_main) File /zope/lib/python/Shared/DC/Scripts/Bindings.py, line 354, in _bindAndExec (Object: manage_main) File /zope/lib/python/App/special_dtml.py, line 241, in _exec (Object: manage_main) File /zope/lib/python/DocumentTemplate/DT_In.py, line 711, in renderwob (Object: objectItems) File /zope/lib/python/DocumentTemplate/DT_In.py, line 839, in sort_sequence (Object: objectItems) File /zope/lib/python/ZODB/Connection.py, line 544, in setstate File /zope/lib/python/ZODB/Connection.py, line 227, in _persistent_load (Info: ('\x00\x00\x00\x00\x00\x00\x17~', '(cExtensionClass\nExtensionClass\nq\x01(U\x07Sectionq\x02(cZClasses.ZClass\ nPersistentClass\nq\x03cZClasses.ObjectManager\nObjectManager\nq\x04cOFS.Sim pleItem\nSimpleItem\nq\x05tq\x06}q\x07(U\x04iconq\x08U1Control_Panel/Product s/Content/Section/ziconImageq\tU\n_p_changedq\nK\x01U\x07__doc__q\x0bU\x07Se ctionq\x0cU\x08positionq\rK\x00U\x14_v_manage_path_rolesq\x0eU\x0fContent/Se ctionq\x0fU\x06_p_oidq\x10U\x08\x00\x00\x00\x00\x00\x00\x17~q\x11U\nziconIma geq\x12(U\x08\x00\x00\x00\x00\x00\x00\x17\x95q\x13(U\tOFS.Imageq\x14U\x05Ima geq\x15ttQU\tmeta_typeq\x16U\x07Sectionq\x17U\nmeta_typesq\x18(}q\x19(U\nper missionq\x1aU\x0cAdd Sectionsq\x1bU\x04nameq\x1cU\x07Sectionq\x1dU\x07productq\x1eU\x07Contentq\x 1fU\x06actionq U)manage_addProduct/Content/Section_factoryq!u}qquot;(h\x1aU\x10Add NewsSectionsq#h\x1cU\x0bNewsSectionq$h\x1eh\x1fh U-manage_addProduct/Content/NewsSection_factoryq%u}qamp;(h\x1aU\tAdd Pagesq\'h\x1cU\x04Pageq(h\x1eU\x07Contentq)h Uamp;manage_addProduct/Content/Page_factoryq*u}q+(U\npermissionq,U\x10Add ItemSectionsq-U\x04nameq.U\x0bItemSectionq/U\x07productq0U\x07Contentq1U\x06 actionq2U-manage_addProduct/Content/ItemSection_factoryq3u}q4(U\npermissionq 5U\x13Add CatalogSectionsq6U\x04nameq7U\x0eCatalogSectionq8U\x07productq9U\x07Contentq :U\x06actionq;U0manage_addProduct/Content/CatalogSection_factoryqlt;u}q=(U\ nvisibilityqgt;U\x06Globalq?U\ninterfacesq@]qA(cInterface.iclass\nInterface \nqBoqC}qD(U\x11_Interface__attrsqE}qF(U\nwl_getLockqG(cInterface.Method\nMe thod\nqHo}qI(U\x07__doc__qJU6 Returns the locktoken identified by the locktokenuri qKU\x08optionalqL}qMU\x08requiredqN(U\tlocktokenqOtU\x08__name__qPU\nwl_getL ockqQU\tinterfaceqRU\x12WriteLockInterfaceqSU\x07varargsqTNU\x06kwargsqUNU\n positionalqV(hOtubU\rwl_lockValuesqW(hHo}qX(hJU_ Returns a sequence of locks. if \'killinvalids\' is true,\n invalid locks will be deletedqYhL}qZU\x0ckillinvalidsq[K\x00shN)hPU\rwl_lockValuesq\\hRhShTNhUNhV( h[tubU\nwl_hasLockq](hHo}q^(hJUU Returns true if the lock identified by the token is attached\nto the object. q_hL}q`h[K\x00shN(U\x05tokenqa and on and on for a while. -- Tim McLaughlin iterationZERO - www.iterationzero.com 703.481.2233 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce
Re: [Zope-dev] nasty persistence problem
Thanks Chris, I'll hold on to that for a rainier day. I just worked this one out in a very roundabout way ;) A product had gotten copied in that moved a Product class from one module to another even though everything else was the same. It seems that ZODB doesn't like that. So, somehow, that caused all kinds of unrelated problems. I put the product back to the way it was, deleted acl_users through python, restarted, went in and undid the Global Registry Rebuild and the delete and voila! It works again. Thanks, Tim Chris McDonough wrote: do this in the debugger: import Zope app = Zope.app() app.fixupZClassDependencies(rebuild=1) get_transaction().commit() exit the debugger and restart, see what happens. - Original Message - From: Tim McLaughlin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 12, 2001 10:29 AM Subject: [Zope-dev] nasty persistence problem I seem to be in a bad spot. When I restarted Zope after modifying some products, I got a Could not load oid.. for all URLs. Basically, the only way I could even access anything was by doing an import Zope in the Python interpreter and deleting acl_users which is an instance of LoginManager. And now I found out (once I was able to login to ZMI) that two vital ZClasses are broken also. So, I'm kinda stuck. Here's the error: Error Type: Could not load oid ~, pickled data in traceback info may contain clues Error Value: None Here's the traceback if it helps... Traceback (innermost last): File /zope/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /zope/lib/python/Zope/__init__.py, line 226, in zpublisher_exception_hook (Object: LockableItem) File /zope/lib/python/ZPublisher/Publish.py, line 171, in publish File /zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_main) File /zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: manage_main) File /zope/lib/python/Shared/DC/Scripts/Bindings.py, line 324, in __call__ (Object: manage_main) File /zope/lib/python/Shared/DC/Scripts/Bindings.py, line 354, in _bindAndExec (Object: manage_main) File /zope/lib/python/App/special_dtml.py, line 241, in _exec (Object: manage_main) File /zope/lib/python/DocumentTemplate/DT_In.py, line 711, in renderwob (Object: objectItems) File /zope/lib/python/DocumentTemplate/DT_In.py, line 839, in sort_sequence (Object: objectItems) File /zope/lib/python/ZODB/Connection.py, line 544, in setstate File /zope/lib/python/ZODB/Connection.py, line 227, in _persistent_load (Info: ('\x00\x00\x00\x00\x00\x00\x17~', '(cExtensionClass\nExtensionClass\nq\x01(U\x07Sectionq\x02(cZClasses.ZClass\ nPersistentClass\nq\x03cZClasses.ObjectManager\nObjectManager\nq\x04cOFS.Sim pleItem\nSimpleItem\nq\x05tq\x06}q\x07(U\x04iconq\x08U1Control_Panel/Product s/Content/Section/ziconImageq\tU\n_p_changedq\nK\x01U\x07__doc__q\x0bU\x07Se ctionq\x0cU\x08positionq\rK\x00U\x14_v_manage_path_rolesq\x0eU\x0fContent/Se ctionq\x0fU\x06_p_oidq\x10U\x08\x00\x00\x00\x00\x00\x00\x17~q\x11U\nziconIma geq\x12(U\x08\x00\x00\x00\x00\x00\x00\x17\x95q\x13(U\tOFS.Imageq\x14U\x05Ima geq\x15ttQU\tmeta_typeq\x16U\x07Sectionq\x17U\nmeta_typesq\x18(}q\x19(U\nper missionq\x1aU\x0cAdd Sectionsq\x1bU\x04nameq\x1cU\x07Sectionq\x1dU\x07productq\x1eU\x07Contentq\x 1fU\x06actionq U)manage_addProduct/Content/Section_factoryq!u}qquot;(h\x1aU\x10Add NewsSectionsq#h\x1cU\x0bNewsSectionq$h\x1eh\x1fh U-manage_addProduct/Content/NewsSection_factoryq%u}qamp;(h\x1aU\tAdd Pagesq\'h\x1cU\x04Pageq(h\x1eU\x07Contentq)h Uamp;manage_addProduct/Content/Page_factoryq*u}q+(U\npermissionq,U\x10Add ItemSectionsq-U\x04nameq.U\x0bItemSectionq/U\x07productq0U\x07Contentq1U\x06 actionq2U-manage_addProduct/Content/ItemSection_factoryq3u}q4(U\npermissionq 5U\x13Add CatalogSectionsq6U\x04nameq7U\x0eCatalogSectionq8U\x07productq9U\x07Contentq :U\x06actionq;U0manage_addProduct/Content/CatalogSection_factoryqlt;u}q=(U\ nvisibilityqgt;U\x06Globalq?U\ninterfacesq@]qA(cInterface.iclass\nInterface \nqBoqC}qD(U\x11_Interface__attrsqE}qF(U\nwl_getLockqG(cInterface.Method\nMe thod\nqHo}qI(U\x07__doc__qJU6 Returns the locktoken identified by the locktokenuri qKU\x08optionalqL}qMU\x08requiredqN(U\tlocktokenqOtU\x08__name__qPU\nwl_getL ockqQU\tinterfaceqRU\x12WriteLockInterfaceqSU\x07varargsqTNU\x06kwargsqUNU\n positionalqV(hOtubU\rwl_lockValuesqW(hHo}qX(hJU_ Returns a sequence of locks. if \'killinvalids\' is true,\n invalid locks will be deletedqYhL}qZU\x0ckillinvalidsq[K\x00shN)hPU\rwl_lockValuesq\\hRhShTNhUNhV( h[tubU\nwl_hasLockq](hHo}q^(hJUU Returns true if the lock identified by the token is attached\nto the object. q_hL}q`h[K\x00shN(U\x05tokenqa and on and on for a while.