question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

locate function always returns None

See original GitHub issue

I did a screenshot of my screen on mac (entire display) and then cropped a small area. Used those images on the locate function always returns None.

print pyautogui.locate('button.png', 'screengrab.png', grayscale=True)

Issue Analytics

  • State:open
  • Created 9 years ago
  • Reactions:1
  • Comments:31 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
jeremygraycommented, Apr 28, 2017

I started a new issue (#150) for this feature request, to keep the issues separate

1reaction
pythonadventurercommented, Feb 24, 2018

For what it’s worth, I solved this problem for myself in Windows 10 by turning off “Transparency Effects” in Themes and Related Settings => Colors.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does my recursive function return None? - Stack Overflow
Use return for recursive function in order to put its value into the stack , so that when function will do recursion values...
Read more >
What does it mean when the Python function returns none?
It means you have not returned anything. You must add a return statement into the function. For example: def fun(a, b):.
Read more >
Why does the return function in python always return none no ...
If you're trying to run the code above then to me it looks like you've only defined things. In this case you've made...
Read more >
Why does my function print None in Python [Solved] | bobbyhadz
Functions often print None when we pass the result of calling a function that doesn't return anything to the print() function. All functions...
Read more >
Python return statement - DigitalOcean
Every function in Python returns something. If the function doesn't have any return statement, then it returns None . def print_something(s): ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found