启动python windows服务可执行文件时出错 [英] Error while starting python windows service executable

查看:36
本文介绍了启动python windows服务可执行文件时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按照
的指示制作 python Windows 服务https://www.thepythoncorner.com/2018/08/how-to-create-a-windows-service-in-python/ 直接从python控制台安装的服务运行正常.
但是当我通过 auto-py-to-exe 制作可执行文件(用于没有 python 环境的服务器)并通过命令提示符安装时,它会安装但出现此错误

I am trying to make a python windows service as instructed from
https://www.thepythoncorner.com/2018/08/how-to-create-a-windows-service-in-python/ The service installed directly from python console runs just fine.
but when I make the executable file (for server without python environment) by auto-py-to-exe and install via command prompt it installs but gave this error

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 时发生

This error only occurs when .py script converted into .exe

推荐答案

我在pip中删除了模块servicemanager并编辑运行pyinstaller解决问题

I remove module servicemanager in pip and edit and run pyinstaller solve the problem

pip uninstall servicemanager

这篇关于启动python windows服务可执行文件时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆