Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

py2exe windows service problem

I have successfully converted my python project to a service. When using the usual options of install and start/stop, everything works correctly. However, I wish to compile the project using py2exe, which seems to work correctly until you install the EXE as a service and try and run it.

You get the following error message:

  • Starting service CherryPyService
  • Error starting service: The service did not respond to the start or control request in a timely fashion.

My compile python file (which links to the main project) is as follows:

  • from distutils.core import setup
  • import py2exe

  • setup(console=['webserver.py'])

Any help would be greatly appreciated.

like image 823
williamtroup Avatar asked Jun 15 '09 13:06

williamtroup


1 Answers

You setup.py file should contain

setup(service=["webserver.py"])

as shown in the "old" py2exe docs

like image 162
Ber Avatar answered Sep 28 '22 02:09

Ber