P
P
Python Newbie2021-07-14 14:47:55
Python
Python Newbie, 2021-07-14 14:47:55

How to solve problems with pyautogui?

I wrote a small code in 2 lines:

import pyautogui
pg.move(50, 50)

When I ran it I got an error:
Дом@DESKTOP-4SAR7DE C:\Users\Дом\Desktop\python
$ python pcman.py
Traceback (most recent call last):
  File "C:\Users\Дом\Desktop\python\pcman.py", line 1, in <module>
    import pyautogui as pg
  File "C:\Users\Дом\AppData\Local\Programs\Python\Python39\lib\site-packages\pyautogui\__init__.py", line 221, in <module>
    locateOnWindow.__doc__ = pyscreeze.locateOnWindow.__doc__
AttributeError: module 'pyscreeze' has no attribute 'locateOnWindow'

Дом@DESKTOP-4SAR7DE C:\Users\Дом\Desktop\python


What to do?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
ToxaDHD, 2021-08-22
@Levman5

You don't need to downgrade Python. You need to downgrade the version of the pyautogui module itself.
This can be done using this command: pip install PyAutoGUI==0.9.52
Apparently, in version 0.9.53, someone messed up somewhere.

A
Alexander, 2021-07-14
@StupidQuestion

60eecfbf136a3545605933.jpeg

S
soremix, 2021-07-15
@SoreMix

Update pyscreeze.
pip install -U pyscreeze
In general, it is better to reduce the version of python to normal

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question