[ZODB-Dev] cPickle: state is not a directory/Upgrade to Zope 2.7failing

Andreas Jung lists at andreas-jung.com
Tue Nov 4 02:22:21 EST 2003



--On Montag, 3. November 2003 11:36 Uhr -0500 Tim Peters <tim at zope.com> 
wrote:
>
> So we need more info.  Two things:
>
> 1. Fiddle _set_ghost_state to output repr(p) when this fails.
>    That is, I need to see the actual pickle, in all its gory glory.
>    All we can deduce from the above is that the state object is
>    neither None nor a dict (the error message told us it's not a
>    dict, and it wouldn't have gotten to that check if it were None).
>

repr(p):

'((U\x0fHelpSys.HelpSysq\x01U\x0bProductHelpq\x02tq\x03Nt.}q\x04(U\x07catal
ogq\x05(U\x08\x00\x00\x00\x00\x00\x01FSq\x06(U\x1aProducts.ZCatalog.ZCatalo
gq\x07U\x08ZCatalogq\x08ttQU\x0elastRegisteredq\t(cDateTime.DateTime\nDateT
ime\nq\nNoq\x0b(GA\xcf\xb7\xf0\xe4\x94\x18\x93U\x05GMT+2q\x0ctbU\x05titleq\
rU\x14CMF CollectorNG 
Helpq\x0eU\x08_objectsq\x0f(}q\x10(U\tmeta_typeq\x11U\nHelp 
Topicq\x12U\x02idq\x13U\x0fplaceholder.txtq\x14uth\x13U\x04Helpq\x15U\x0fpl
aceholder.txtq\x16(U\x08\x00\x00\x00\x00\x00\x01FTq\x17(U\x11HelpSys.HelpTo
picq\x18U\x08STXTopicq\x19ttQu.'


> 2. You might try fiddling _set_ghost_state to use pickle.py instead
>    of the cPickle module.  Sometimes there's a bug in one that's not
>    in the other, and even if not pickle.py sometimes produces
>    error messages that are more informative.

Using pickle.py:


------
2003-11-04T08:16:50 INFO(0) ZServer HTTP server started at Tue Nov  4 
08:16:50 2003
	Hostname: sentinel
	Port: 20080
------
2003-11-04T08:16:50 INFO(0) ZServer FTP server started at Tue Nov  4 
08:16:50 2003
	Hostname: localhost.localdomain
	Port: 20021
------
2003-11-04T08:16:51 DEBUG(-200) Localizer Unicode patching for Zope 2.6b1+
------
2003-11-04T08:16:51 DEBUG(-200) FileStorage create storage 
/develop/sandboxes/tracker/instance/var/Data.fs
------
2003-11-04T08:16:51 INFO(0) ZODB Opening database for mounting: 
'145966912_1035475459.685228'
------
2003-11-04T08:16:51 DEBUG(-200) TemporaryStorage create storage 
TemporaryStorage
------
2003-11-04T08:16:51 INFO(0) ZODB Mounted database 
'145966912_1035475459.685228' at /temp_folder
------
2003-11-04T08:16:51 ERROR(200) ZODB Couldn't load state for 0000000000014652
Traceback (most recent call last):
  File "/develop/sandboxes/tracker/Zope/lib/python/ZODB/Connection.py", 
line 564, in setstate
    self._set_ghost_state(obj, p)
  File "/develop/sandboxes/tracker/Zope/lib/python/ZODB/Connection.py", 
line 606, in _set_ghost_state
    state = unpickler.load()
  File "/opt/python-2.3.2/lib/python2.3/pickle.py", line 872, in load
    dispatch[key](self)
  File "/opt/python-2.3.2/lib/python2.3/pickle.py", line 1244, in load_build
    inst.__dict__.update(state)
AttributeError: keys
------
2003-11-04T08:16:51 ERROR(200) Zope Couldn't install CMFCollectorNG
Traceback (most recent call last):
  File "/develop/sandboxes/tracker/Zope/lib/python/OFS/Application.py", 
line 642, in install_product
    initmethod(context)
  File 
"/develop/sandboxes/tracker/instance/Products/CMFCollectorNG/__init__.py", 
line 52, in initialize
    context.registerHelp(directory='help')
  File "/develop/sandboxes/tracker/Zope/lib/python/App/ProductContext.py", 
line 302, in registerHelp
    if help.lastRegistered is not None and \
AttributeError: lastRegistered
Traceback (most recent call last):
  File "/develop/sandboxes/tracker/Zope/lib/python/Zope/Startup/run.py", 
line 27, in ?
    run()
  File "/develop/sandboxes/tracker/Zope/lib/python/Zope/Startup/run.py", 
line 24, in run
    start_zope(opts.configroot)
  File 
"/develop/sandboxes/tracker/Zope/lib/python/Zope/Startup/__init__.py", line 
50, in start_zope
    starter.startZope()
  File 
"/develop/sandboxes/tracker/Zope/lib/python/Zope/Startup/__init__.py", line 
221, in startZope
    Zope.startup()
  File "/develop/sandboxes/tracker/Zope/lib/python/Zope/__init__.py", line 
46, in startup
    _startup()
  File "/develop/sandboxes/tracker/Zope/lib/python/Zope/App/startup.py", 
line 95, in startup
    OFS.Application.initialize(application)
  File "/develop/sandboxes/tracker/Zope/lib/python/OFS/Application.py", 
line 421, in initialize
    install_products(app)
  File "/develop/sandboxes/tracker/Zope/lib/python/OFS/Application.py", 
line 580, in install_products
    folder_permissions, raise_exc=debug_mode)
  File "/develop/sandboxes/tracker/Zope/lib/python/OFS/Application.py", 
line 642, in install_product
    initmethod(context)
  File 
"/develop/sandboxes/tracker/instance/Products/CMFCollectorNG/__init__.py", 
line 52, in initialize
    context.registerHelp(directory='help')
  File "/develop/sandboxes/tracker/Zope/lib/python/App/ProductContext.py", 
line 302, in registerHelp
    if help.lastRegistered is not None and \
AttributeError: lastRegistered

COuld be something with the HelpSys but I have no idea at this time what 
the problem could be...doing
some further investigations.

-aj







More information about the ZODB-Dev mailing list