[Zope] SystemError: NULL object passed to Py_BuildValue

Dieter Maurer dieter at handshake.de
Mon Aug 9 13:24:15 EDT 2004


Marcel Maré wrote at 2004-8-9 12:22 +0200:
>On 8-aug-04, at 22:47, Dieter Maurer wrote:
> ...
>>>   File
>>> "/usr/local/apache4/python/ZopeA/Zope-2.7.0bin/lib/python/ZODB/
>>> Connection.py", line 413, in commit
>>>     state=object.__getstate__()
>>> SystemError: NULL object passed to Py_BuildValue
>>
>> This is (almost surely) caused by an extension object
>> with a broken "__getstate__".
>>
>> You must find out the class of this object.(e.g.
>> by catching the exception, printing the class and then
>> reraising).
> ...
>Thx Dieter. Any pointers as to how to do his? I don't have a clue where 
>to begin.
>As I pointed out, this occurs once in a while, out of the blue,  on a 
>production server (no less).

With what part of the above recommendation you need help?

  Locating the line where to place the "try: .. except:"?
  "line 413 of "ZODB/Connection.py"

  Printing the class? 
	   print type(object)
	   if hasattr(object, '__class__'): print object.__class__
    or better -- logging:

     from zLOG import LOG, ERROR:
     LOG('ZODB Connection', ERROR, str(type(object)))
     if hasattr(object, '__class__'): 
        LOG('ZODB Connection', ERROR, str(object.__class__))

  Reraising?	  "raise"

-- 
Dieter


More information about the Zope mailing list