Open executionByFork opened 5 years ago
$ pip freeze
numpy==1.15.4
opencv-python==3.4.3.18
Pillow==5.3.0
PyAutoGUI==0.9.38
PyMsgBox==1.0.6
PyScreeze==0.1.18
PyTweening==1.0.3
six==1.11.0
xlib==0.21
Additionally, see my other issue I opened. Perhaps they are related. #280
Were you ever able to fix the issue? I am having the same issue on a chromebook running crostini.
I have not found a fix
Try to run the Python IDLE as Admin.
Try to use just one display/monitor. It works for me.
Try to use just one display/monitor. It works for me.
I have tried with only one display. Are you using Crostini?
I'm using Mint. It may be regarding your OS so
I'm using Manjaro Linux ,i seem to be able to use typewrite and keyboard functions and my program compiles just fine but my mouse functions don't work at all
It seems that after you install the pyautogui and its following packages, you should restart the computer. At first my pyautogui on my ubuntu doesn't read pixel nor interact with mouse. But after restarting, now it works like a charm
Its so frustrating, I am having this issue on Ubuntu. The click functions work fine but the cursor doesn't move an inch. Has anyone found the fix?
When I was running into this it was because I wasn't running from an administrator level.
@AliHaiderPAK hi, About the mouse doesn't move , dou you have some solution?
Hi @whitelowrie yes I resoleved that issue two months ago but currently its out of my mind that how I did it:-), are you having this issue on linux?
@whitelowrie its was something related to "sudo xkeysnail config.py"
@AliHaiderPAK I can't able to move the mouse either. How exactly you rectify this issue?
am facing the same issue on ubuntu 22.04 LTS, tried sudo python3 _scriptname.py , installed the pyautogui dependency with sudo but no success
for ubuntu, switching from waylang to xorg worked for me. Follow this link https://beebom.com/how-switch-between-wayland-xorg-ubuntu/#:~:text=On%20the%20password%20screen%2C%20you,select%20%E2%80%9CUbuntu%20on%20Wayland%E2%80%9D.
Hi All, I hope everyone is doing well.
Now I am on a mac, but the issues with click()
"not working" I have seen before. Over the last few years I have also run into this a few times. What fixed it for me was utilizing a virtual environment or doing a complete python wipe & reinstall.
Also I believe there are some packages that cause issues, I never found what or why but it does sometimes cause strange behavior & Virtual Environment seems to maintain the behaviour.
If you get a chance try this (Code Blocks are setup for copy-pasta):
cd ~/
mkdir Test
cd Test
python3 -m venv ~/Test
source ~/Test/bin/activate
pip install --upgrade pip
pip install pyautogui
pip install pyobjc
pip install pyobjc-core
pip freeze
# this is what i got right now
# MouseInfo==0.1.3
# PyAutoGUI==0.9.53
# PyGetWindow==0.0.9
# PyMsgBox==1.0.9
# pyobjc==9.0.1
# pyobjc-core==9.0.1
# pyobjc-framework-*==9.0.1 # there are a bunch of these. i combined them for ease of reading. all the same verison 9.0.1
# pyperclip==1.8.2
# PyRect==0.2.0
# PyScreeze==0.1.28
# pytweening==1.0.4
# rubicon-objc==0.4.3
python
import pyautogui
pyautogui.position()
pyautogui.move(284, 202)
pyautogui.click()
# or try being explicit:
pyautogui.click(x=284, y=202, clicks=1, interval=0.0325, button="left")
pyautogui controls mouse clicks differently for 'darwin' os system as seen here.
If that still fails, you can try my approach from stackoverflow.
Or try a specific version & retry your tests:
pip install 'pyautogui==0.9.44'
The specific version was my work-around to fix my issues, I ran into.
I later contributed to some fixes for mac with mouse behaviour to help resolve the issue.
This fixed my issue when I was writing some code to play "Realm Grinder" Game: https://github.com/JayRizzo/rg_code
I hope this helps! Good Luck!
Don't have a Good Day, Have a Great Day!
having same isssue
Same problem Wayland, cursor does not move
I was having the same issue in a windows VM and I solved it by passing the duration parameter. Anything lower than 0.7 didn't work. Restarting the pc after installing pyautogui also didn't work.
pyautogui.moveTo(1500, 1000, duration=0.7)
This is my version (from pip):
Name: PyAutoGUI
Version: 0.9.54
I created a stackoverflow question about this here, but it seems no one has any solutions to my problem. The linked post has the details and visually shows the issue I am having, but the basic problem is that
pyautogui
is not moving my visual mouse pointer. Additionally, when I run a script, moving my mouse to the top left corner does not stop the script. Strangely, the script still works as long as I do not move my mouse, as if the library is interacting with an invisible mouse.What is going wrong and how might I fix it?
I am running Ubuntu 18.04 LTS, and it is essentially a fresh install. Please see my link to the stackoverflow question for the photo example and more detail.