Open Haislich opened 1 year ago
Rolling back to python 3.10.5 solves the issue.
I encountered a similar situation, although I received a different error: https://stackoverflow.com/questions/76174279/module-not-found-error-in-python-script-running-as-a-windows-service
However your fix of reverting to 3.10.x resolved the problem. So it appears there's an incompatibility between Python 3.11 and pywin32, which needs corrected.
I suspect it has something to do not only with Python version, but Windows Server as well. I can run my service under Win11, but have same error under Win Server 2019
This issue seems to persist for 3.10.11 and 3.11.5 is there any way to fix this?
Issue also persists when using Python 3.12. However using an environment built with 3.10.11, I do not get the error. (This is on a machine running Windows Server 2016.)
I have the same issue (error 1053 when starting the service and the log shows "ModuleNotFoundError: No module named 'servicemanager'") on windows 11. The issue happens on both python 3.12.6 and 3.10.0. The service only runs when not using the virtualenv, on any python version.
I'll re-open this since "downgrading to a lower Python version" isn't a valid fix and there's multiple reports of this still being an issue.
I have a python service which has been running in my local machine for quite a lot now and everything works. I was ready to transition to my server and I've been facing some issues with the insallation process. I installed everything accordingly to running as a windows service.
After the installation of the service however the python service stops with error 1053 and with no useful informations. After some digging I discovered that the problem might be related to the service manager.
When trying to run it in order to register it, which shouldn't be needed, the output is :
Which is weird because everything seems in place to me
The log states:
From the source code of service manager i couldn't trace back the problem since it seems every problem redirects ultimately to this situation.