[python-win32] pywin32 service startup error (sys.winver issue?)

Jean Rousseau jean.marc.dev at gmail.com
Wed Jan 23 16:45:06 CET 2013


Hi All,

I would appreciate some help with troubleshooting an error I now receive
with a pythonservice.exe / pywin32-related services.

Here's the background - platform is Win 2003 Server x86:
1. My test machine was running Python 3.2.3 / pywin32 build 217 and all was
well with the service classes that I wrote and tested.
2. I then installed Python 3.3.0 and pywin32 build 218.
3. I uninstalled pywin32-b217 and Python 3.2.3 and deleted the subdirs.
4. Rebooted the server.
5. I copied my service code to the server and installed my service class
(ie. <service> install), which completed fine.

However, the service fails immediately upon startup with the following
failure:
*The instance's SvcRun() method failed *
*Traceback (most recent call last):*
*  File "C:\Python33\lib\site-packages\win32\lib\win32serviceutil.py", line
834, in SvcRun*
*    self.ReportServiceStatus(win32service.SERVICE_RUNNING)*
*  File "C:\Python33\lib\site-packages\win32\lib\win32serviceutil.py", line
797, in ReportServiceStatus*
*    win32service.SetServiceStatus( self.ssh, status)*
*tuple: (13, 'SetServiceStatus', 'The data is invalid.') *
*%2: %3*

Puzzled by this, I though that pythonservice.exe may have some registration
issue, so I tried to /register it, but received the following message:

*Registering the Python Service Manager...*
*Registration failed as sys.winver is not available or not a string*
*
*
So, I'm pretty confused. The service code has worked flawlessly up until
now, and now I get this strange error after moving to Python 3.3.
I have taken some obvious actions - I uninstalled Python and pywin32 and
deleted the associated subdirs (twice!), restarted the server and
reinstalled, but no success.

What am I missing?? I have Mark's book, but the section on services doesn't
shed any light on this error (nor do I expect it to).

I am thankful for any help.

TIA,

Jean-Marc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20130123/ad7b4aa7/attachment.html>


More information about the python-win32 mailing list