-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Getting AttributeError: module 'pyscreeze' has no attribute 'locateOnWindow' on import #598
Comments
you are not the only one. We updated to this release yesterday and it caused all our testing to fail. |
Same here. It says this line is the problem
And throws the same error. |
Doesn't it work the solution for you? I've got the same error message when my system user name isn't in English. If it is, it works fine. Anyway, how about make a new account and try it. |
> I've got the same error message when my system user name isn't in English. If it is, it works fine. |
I've got the same error. I call the pyautogui.locateOnScreen function, but result is the error below.
There is NO pyautogui/pyautogui/__init__.py Line 219 in 5e4acb8
|
Hi Everyone! I hope everyone is doing well. It looks like there is an easy fix for this one. pyautogui/pyautogui/__init__.py Line 221 in 5e4acb8
Here on this line we just need to change
To This:
Update this and your inputs will work. The ++@asweigart, FYI
The file location for me was: Do not look in the |
Thank you! By any chance, has this already been submitted as a PR or already in the works to be modified directly on the main branch? |
@JayRizzo : Thanks a lot for the proposed solution. But, as addressed by @nanpuhaha, isn't the problem somewhat deeper if there is no I mean, pyautogui/pyautogui/__init__.py Lines 211 to 216 in 5e4acb8
Thus, I guess we do not need to import the pyautogui/pyautogui/__init__.py Lines 217 to 222 in 5e4acb8
What I did to fix the issue for the time being was simply to comment out those five lines 217-221. So far, it also works. @Zaedus : I can't find any current pull request dealing with this. But I also find it hard to submit one without knowing what was the intention of @asweigart for the |
I run into this problem today and it was due to a newer pyautogui version with old pyscreeze. |
|
You should update pyscreeze to at least 0.1.28. to fix this error.
|
Excellent answer. Then I just have to give a pip install flask |
thank you for your support it helps me to solve my problem |
When attempting
import pyautogui
, I get the following error message and traceback:I have checked the contents of
pyscreeze/__init__.py
, not just on my computer, but as it currently appears in the pyscreeze repository as well, and there really is nolocateOnWindow
function/class/etc. contained in it.The problem might have been introduced by this commit about 2-3 months ago. Strangely, however, I have not been able to find anyone else on the web experiencing it.
The text was updated successfully, but these errors were encountered: