Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uiautomation中的comtypes库报错,如何解决? #279

Open
lingduxingxi opened this issue Apr 25, 2024 · 1 comment
Open

uiautomation中的comtypes库报错,如何解决? #279

lingduxingxi opened this issue Apr 25, 2024 · 1 comment

Comments

@lingduxingxi
Copy link

微信图片_20240425161803
微信图片_20240425161828

D:\uiautomation\python_bot>PYTHON D:\uiautomation\python_bot\daohang_bot.py
Traceback (most recent call last):
File "D:\uiautomation\python_bot\daohang_bot.py", line 14, in
import uiautomation
File "D:\Python34\lib\site-packages\uiautomation_init_.py", line 4, in
from .uiautomation import *
File "D:\Python34\lib\site-packages\uiautomation\uiautomation.py", line 23, in

import comtypes #need pip install comtypes
File "D:\Python34\lib\site-packages\comtypes_init_.py", line 263
case_insensitive: bool
^
SyntaxError: invalid syntax

D:\uiautomation\python_bot>PYTHON D:\uiautomation\python_bot\daohang_bot.py
Traceback (most recent call last):
File "D:\uiautomation\python_bot\daohang_bot.py", line 14, in
import uiautomation
File "D:\Python34\lib\site-packages\uiautomation_init_.py", line 4, in
from .uiautomation import *
File "D:\Python34\lib\site-packages\uiautomation\uiautomation.py", line 23, in

import comtypes #need pip install comtypes
File "D:\Python34\lib\site-packages\comtypes_init_.py", line 263
case_insensitive: bool
^
SyntaxError: invalid syntax

D:\uiautomation\python_bot>pip list

这个报错,怎么办?XP 32位系统

@yinkaisheng
Copy link
Owner

pip install comtypes==1.2.1
并且使用最新的uiautomation 2.0.19版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants