[Zope-dev] Zope2.7.0rc2 AttributeError: 'NoneType' object has noattribute 'setHeader'

Dieter Maurer dieter at handshake.de
Mon Feb 9 13:27:27 EST 2004


Lennart Regebro wrote at 2004-2-9 11:04 +0100:
>From: "Dieter Maurer" <dieter at handshake.de>
>> ... objects turned into None ...
>
>Also, loads of objects can become None when you do a refresh, because of
>some strange bug in the refresh support that has been there since it got
>integrated into the core and which nobody seems to understand.

I think I understand it.

   When Python delete a module it lets the objects in the module become
   None.

   Refresh works by deleting the product modules from "sys.modules"
   and then forcing the ZODB caches to be reset when a ZODB
   connection is opened the next time.

This "turning into None" is not unintelligent.
Without it, you could use an old and no longer current object
without noticing it...

-- 
Dieter



More information about the Zope-Dev mailing list