我正在尝试按照指示创建一个 python windows 服务
https://www.thepythoncorner.com/2018/08/how-to-create-a-windows-service-in-python/ https://www.thepythoncorner.com/2018/08/how-to-create-a-windows-service-in-python/直接从 python 控制台安装的服务运行得很好。
但是当我通过 auto-py-to-exe 制作可执行文件(对于没有 python 环境的服务器)并通过命令提示符安装时,它安装但给出了此错误
windows_service.exe install
Installing service TestService
Changing service configuration
service Updated
windows_service.exe start
Starting service TestService
Error starting service : The service did not respond to the start or control request in timely fashion
windows_service.exe debug
AttributeError: module "servicemanager" has no attribute 'debugging'
仅当 .py 脚本转换为 .exe 时才会出现此错误
我在 pip 中删除模块 servicemanager 并编辑并运行 pyinstaller 解决问题
pip uninstall servicemanager
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)