[Zope-dev] Experiencing TypeError: The object is not a PySECURITY_ATTRIBUTES object

Tim Peters tim.peters at gmail.com
Wed Oct 26 18:00:44 EDT 2005


[Mark Hammond]
>  FYI, there is a new pywin32 build out now that should solve this problem
> without requiring any imports to be reordered.

Yay!

> It would be great if whoever turns the crank for the next Zope/Windows
> builds (which may even turn out to be me! :) uses build 205.

Andreas Jung made a "surprise" release of Zope 2.8.4 today, but only
the tarball, not a Windows installer.  If you want to make the latter,
more than fine by me, else I'll try to make one tomorrow (with your
build 205, of course -- will require some retroactive patching of the
2.8.4 tag no matter who does it).

> Sadly, I believe it is not trivial to install a new pywin32 build into a
> Zope binary.  You could patch it up though by opening the pywin32 release
> executable in WinZip (or similar), then replacing 'pywintypes.py' and
> extracting a new "_win32sysloader.pyd" module.

Ya, like Windows users are gonna do _that_ <wink>.

> Finally, I believe another way to solve this problem would be to remove
> pywintypes23.dll from the system32 directory (the the underlying problem is
> that 2 copies of this DLL are being loaded into memory).  However, doing
> this may prevent other things (such as your existing Python installation)
> from working correctly, so do this with caution.  Zope does not install
> anything into system32, so presumably something else on your system is also
> using Python.

All "recent" PySECURITY_ATTRIBUTES complaints I know about have come
from people using both Zope and Plone.  I don't know anything about
Plone installation, but it's natural to suspect that Plone is the
source of the other pywin32 installation, and possibly of compounding
sys.path convolutions too.

So, a natural question based on this ignorance:  is it enough for just
Zope to install build 205, if Plone also installs its own (older)
pywin32 and mangles sys.path so that its pywin32 is also visible?  I
suspect (but don't know) that's what's happening.  It would be a lot
better if a Plone user tested the proposed solution before we release
another Windows Zope that may still turn out not to solve Plone's
problems here.


More information about the Zope-Dev mailing list