#๐ Image Recognition
20 messages ยท Page 1 of 1 (latest)
@cold gust
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Put r before the string to let python know it should take it as-is, without trying to interpret backslashes as escape commands.
Also, one set of quotes only.
So like image_path = r"C:\Users..."
Gotcha will try the r now
and yeah i noticed the quotes after i sent this!
This is the error i got.
@desert holly so it worked partly i think but im not sure what im looking at
im assuming since it has retries it failed to find the image on screen with the ammount of retries?
You did if/else but it seems the function raises an exception if image is not found instead of returning something falsy. So you need try/except instead of if/else
Ok, yeah i had a friend write is at ive never messed with if statements or image recognition so this is my frist time.
is there a reason why it culdnt find a image tho? if the image is on my screen?
If statements are very basic thing, you should therefore grab the basic resources and learn at least that much ๐ but learning as far as exceptions should be good for this project as well
Depends. Is it exactly the same size? is it visible in full? Etc. I'd also check the docs to see if the call can be parametrised and what the docs say about the error
So im using a screenshot i had taken from a larger screen. The part that i took a screenshot is fully visable.
ok ill see
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.