-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
move function does not take None #684
Comments
Hi all, This is a quick fix for asweigart#684. Please update if needed. This is in addition to asweigart#559 asweigart#592 that have already been merged.
Hi @arisliang, I hope you are doing well. Yes, I see this too. This behaviour changed after 3.10 int(None)
# Traceback (most recent call last):
# File "<stdin>", line 1, in <module>
# TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' I did some digging around and created a fix for you. if you want to resolve this on your machine as a workaround until this gets resolved do the following. Update Yourself (Workaround)Locate your pyautogui init filein your error you will get the path to the file it is complaining on line 701 of pyautogui.init Copy that path and open the file in your text editor. THEN: Paste these two lines into your existing pyautogui installed package: (mine is line 701 & 702): firstArg = 0 if firstArg is None else firstArg
secondArg = 0 if secondArg is None else secondArg It should look like this: else:
firstArg = 0 if firstArg is None else firstArg
secondArg = 0 if secondArg is None else secondArg
return Point(int(firstArg), int(secondArg)) # firstArg and secondArg are just x and y number values You can reference my commit if it helps visually.
pip install pyautogui --upgrade --force
# OR
pip3 install pyautogui --upgrade --force Found & fixed a Separate Issue** Now in my search I discovered another odd behaviour that I addressed in #690. and PR691 Have a Great day! |
Thanks for the fix. I can wait for the next release. |
There's an example usage in readme
pyautogui.move(None, 10)
.It runs with error in repl:
version: '0.9.53'
windows 10
The text was updated successfully, but these errors were encountered: