zlib + Windows 32 service problem (ImportError)

Laszlo Zsolt Nagy gandalf at geochemsource.com
Tue Aug 16 10:26:19 CEST 2005

vincent wehren wrote:

>"Laszlo Zsolt Nagy" <gandalf at geochemsource.com> schrieb im Newsbeitrag 
>news:mailman.3098.1124117300.10512.python-list at python.org...
>| Sorry, I realized that the import zlib was not executed from my
>| (working) service.
>| So here is the question: why can't I use zlib from a win32 service? Is
>| there any way to make it working?
>| >-------------
>| >Python could not import the service's module
>| >  File "T:\Python\Projects\NamedConnector\Service.py", line 17, in ?
>| >    from Processor import *
>| >  File "c:\Python\Projects\NamedConnector\Processor.py", line 35, in ?
>| >    from mess import MessageSocket
>| >  File "T:\Python\Lib\mess\MessageSocket.py", line 31, in ?
>| >    import zlib
>| >exceptions.ImportError: dynamic module does not define init function
>| >(initzlib)
>| >-------------
>I had a similar problem where a zlib.dll that is *not a Python extension* is 
>in sys.path *before* zlib.pyd. Python will try to import this zlib.dll and 
>find the  dll doesn't export a initzlib:
>for more info see 
Thanks. I set my system environment variable 'PATH' to this:

Files\Common Files\GTK\2.0\bin

Then I restarted my computer. It is still missing initzlib. :-(
Please note that I can run the same program as an application, logged in 
as the same user.


More information about the Python-list mailing list