Skip to content

[RPA][ERROR] - cannot find example.png - Windows display zoom level #119

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

Closed
pierrekublik opened this issue Apr 3, 2020 · 5 comments
Closed
Labels

Comments

@pierrekublik
Copy link

Hey All,
I looked through the Forum but only found a related, but not the same error.
I want to use the following Code:

r.init(True, False)
r.click("Zertifikate.PNG")
r.close()

I get the error message: "- cannot find Zertifikate.PNG"
The file "Zertifikate.PNG" is in the same Folder like my jupyter Notebook.
I made the screenshot via "Windows" + "shift" + "S" for my Zertifikate.PNG
I use Jupyter Notebook via Anaconda.

If I use the coordinates of the Picture with r.click, it clicks on the Image.
But why does it not work with the png file?
Attached is the complete Log and the Jupyter Code.

fehlermeldung
jupyter hub ausschnitt

It took me the whole day now and I couldnt find the solution for Windows.
I would be so glad if you can help me.

Btw: I am relatively new to programming.

Best regards

Pierre

@kensoh
Copy link
Member

kensoh commented Apr 3, 2020

Hi Pierre, thanks for trying out this RPA package for Python! Hope you'll have fun using it.

The error happens when the provided image cannot be found on the screen. There are a few ideas to try to find out what was not working.

  1. From the error log it looks like the image file exists on your desktop Python folder, double check that the file exists there. It looks like it does.

  2. Are you using multiple monitors (laptop monitor and a separate monitor)? It might not work as the tool is designed to work with a single screen. If yes, try disconnecting so that you are only using your laptop monitor.

  3. Try changing your Windows system display zoom level to the recommended % or 100%. Try both to see if it helps. This is a common error mentioned here. The reason is the snapshot of the image may actually be at a different zoom level from your desktop zoom level. So trying to do a match will fail as the image sizes are different to the computer vision engine.

Kind Regards,
Ken

@kensoh kensoh changed the title RPA ERROR: Cannot find example.png (using visual automation) RPA ERROR: Cannot find example.png - pending user checks Apr 3, 2020
@kensoh kensoh added the query label Apr 3, 2020
@kensoh kensoh changed the title RPA ERROR: Cannot find example.png - pending user checks [RPA][ERROR] - cannot find example.png - pending user checks Apr 3, 2020
@pierrekublik
Copy link
Author

Hey kensoh,

It was the display zoom. my Settings were 150 % and now it is 100% and it works fine.
You are a real genius, really apprecciate your help.

Looked over the Forum the whole day but acctually the answer was on page 1... learning from mistakes..

And yes, I really enjoy the package. I tested few Things I usually do with UiPath and it works in a similar manner.
And the best Thing: It is for free… just amazing.

Best regards

Pierre

@kensoh
Copy link
Member

kensoh commented Apr 4, 2020

You're welcome Pierre! Feel free to post any issues you encounter when using the tool, or any suggestions on how the tool can be improved. With a simple but powerful API, it's designed to make development and deployment of automation very fast, have fun! 🚀

@kensoh kensoh changed the title [RPA][ERROR] - cannot find example.png - pending user checks [RPA][ERROR] - cannot find example.png - Windows display zoom level Apr 4, 2020
@kensoh kensoh closed this as completed Apr 5, 2020
@ashoktcr
Copy link

Hello
I am using MacOS Catalina and I am getting the same error "cannot find file.png"
Do I need to open the file, or folder to find it ?
Or I need to give exact file name "print(r.read('/Library/WebServer/Documents/as/RPA/upwork/testpdf.pdf'))" ?

@ashoktcr
Copy link

It works when I open the png file, but not working for pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants