py2exe windows service problem

0 votes
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.

I am getting 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'])

Can anyone help me with this?
May 28, 2019 in Python by ana1504.k
• 7,910 points
1,152 views

1 answer to this question.

0 votes
Check that your setup.py file should contain:

setup(service=["webserver.py"])
answered May 28, 2019 by SDeb
• 13,300 points

Related Questions In Python

0 votes
1 answer

Best way to create a simple python web service

web.py is probably the simplest web framework ...READ MORE

answered Jul 20, 2018 in Python by Priyaj
• 58,020 points
921 views
0 votes
1 answer

How to add to the python path in Windows?

You know what has worked for me ...READ MORE

answered Jul 25, 2018 in Python by Frankie
• 9,830 points
1,039 views
0 votes
1 answer

When I create and remove files rapidly on windows using python I get WindowsError (Error 5)

Here's the short answer: disable any antivirus or ...READ MORE

answered Aug 31, 2018 in Python by charlie_brown
• 7,720 points
1,931 views
+3 votes
2 answers

How do I install pip on Windows?

pip is already installed if you are ...READ MORE

answered Nov 2, 2018 in Python by Priyaj
• 58,020 points
1,420 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,466 views
0 votes
1 answer
0 votes
1 answer

How do I convert a Python program to a runnable .exe Windows program?

Understand that every 'freezing' application for Python ...READ MORE

answered Oct 13, 2018 in Python by SDeb
• 13,300 points
1,477 views
0 votes
1 answer

Deploying Flask on Windows in production

Installing on Windows is kind of like ...READ MORE

answered May 29, 2019 in Python by SDeb
• 13,300 points
3,690 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP