You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Docker+Wine环境中使用Pywinauto遇UIAutomationClient属性错误

桌面RPA项目Pywinauto+Wine+Docker环境下的UIAutomationClient错误问题

我正在开展桌面RPA项目,尝试结合Pywinauto、Wine与Docker:在Ubuntu Docker容器内通过Wine运行Windows应用,用Pywinauto编写Python脚本控制该应用,同时用Xvfb模拟显示环境。

执行脚本导入Pywinauto时遭遇错误:

AttributeError: module 'comtypes.gen' has no attribute 'UIAutomationClient'

环境版本信息

  • Ubuntu 20.04
  • Wine 8.0.1(Windows 10,winehq-stable)
  • Python 3.11.4
  • Pywinauto 0.6.8
  • Comtypes 1.2.0

已完成的排查操作

  • 确认Wine环境仅包含UIAutomationCore DLL,缺少UIAutomationClient
  • 尝试运行clear_comtypes_cache.py清理缓存,未解决问题
  • 测试过多个comtypes版本,当前使用版本为1.2.0

内容的提问来源于stack exchange,提问作者João Pedro Guimarães

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.17 12:59:57