Problem freezing Win32 services

Alexander Wilkens alexw at fast.no.nospam
Thu Feb 14 08:03:01 EST 2002


"Thomas Heller" <thomas.heller at ion-tof.com> wrote in message
news:a4g5sl$f89$1 at ID-59885.news.dfncis.de...
> > I'm attempting to freeze a Windows NT service (in Win2000) written in
Python
> > 2.2 using win32all 142 and the freeze util bundled with Python in the
tools
> > directory, and I've encountered some problems. Freezing console apps
works
> > fine.
> <shameless plug>
> You could (should ;-) try out the newest py2exe release, which also can
> create service exe-files: http://starship.python.net/crew/theller/py2exe/

I tried py2exe and it seems to work better at least :-) I mananged to create
a service executable that can be started either from the Windows Services
GUI or by 'net start myservice'. However if I try to just run the service
executable I get:

Starting service - this may take several seconds - please wait...
Could not start the service - error 997

The real problem, however, starts when I move the executable and associated
pyds and dlls to another computer. I then get the following error in the
event viewer:

"The description for Event ID ( 3 ) in Source ( myservice ) cannot be found.
The local computer may not have the necessary registry information or
message DLL files to display messages from a remote computer. The following
information is part of the event:  ; e; N."

I suspect I may be missing some imports. py2exe gave me some warnings,
however I've tried to find out which it is with no luck. Is there any way to
get more descriptive errors (tracebacks?)? Running the service with
the -debug option outputs "Error 0xC0000003 - The instance's SvcRun() method
failed" and  " e: N" . Any suggestions?

--
Alex





More information about the Python-list mailing list