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
相关产品推荐
相关产品推荐

