【问题标题】:Error while starting python windows service executable启动 python windows 服务可执行文件时出错
【发布时间】:2019-12-24 10:12:08
【问题描述】:

我正在尝试按照
https://www.thepythoncorner.com/2018/08/how-to-create-a-windows-service-in-python/ 的指示创建一个 python windows 服务直接从 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时出现

【问题讨论】:

  • 您找到解决方案了吗?我有完全相同的问题
  • 你能找到答案吗?我非常迫切需要它。在过去的 10 天里,我陷入了困境。

标签: python windows-services


【解决方案1】:

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

pip uninstall servicemanager

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-02
    • 1970-01-01
    • 2014-03-24
    • 1970-01-01
    • 1970-01-01
    • 2012-12-11
    相关资源
    最近更新 更多