测试积点老人 发表于 2019-9-18 11:09:46

同时使用pyautogui和pywinauto中Application方法报错,尝试各种办法无法解决,请高...

代码如下:
import pyautogui
from pywinauto import Application

pyautogui.moveTo(50,50,duration=0.25)


报错信息:
Traceback (most recent call last):
File "D:/SVN/AutoTest/test.py", line 4, in <module>
    pyautogui.moveTo(50,50,duration=0.25)
File "D:\Program Files\Python37\lib\site-packages\pyautogui\__init__.py", line 811, in moveTo
    _failSafeCheck()
File "D:\Program Files\Python37\lib\site-packages\pyautogui\__init__.py", line 1240, in _failSafeCheck
    if FAILSAFE and tuple(position()) in FAILSAFE_POINTS:
File "D:\Program Files\Python37\lib\site-packages\pyautogui\__init__.py", line 296, in position
    posx, posy = platformModule._position()
File "D:\Program Files\Python37\lib\site-packages\pyautogui\_pyautogui_win.py", line 362, in _position
    ctypes.windll.user32.GetCursorPos(ctypes.byref(cursor))
ctypes.ArgumentError: argument 1: <class 'TypeError'>: expected LP_POINT instance instead of pointer to POINT


备注:
如果单独使用pyautogui 正常,如下:
import pyautogui

pyautogui.moveTo(50,50,duration=0.25)

只要引入pywinauto的Application就报错

qqq911 发表于 2019-9-19 10:34:25

冲突了

jingzizx 发表于 2019-9-19 12:05:01

不清楚

litingting0214 发表于 2019-9-19 13:44:44

不太清楚

海海豚 发表于 2019-9-19 15:49:00

查一下报错信息

chenjianlin 发表于 2019-9-19 17:04:17

仔细看查看和自我分析原因,相信你应该没问题

chenjianlin 发表于 2019-9-19 17:09:15

兼容性或者程序、软件和环境等之间冲突
页: [1]
查看完整版本: 同时使用pyautogui和pywinauto中Application方法报错,尝试各种办法无法解决,请高...