asweigart / pyscreeze

PyScreeze is a simple, cross-platform screenshot module for Python 2 and 3.
BSD 3-Clause "New" or "Revised" License
194 stars 96 forks source link

RuntimeError: generator raised StopIteration on Python 3.7 64bit windows #36

Open mkirklions opened 6 years ago

mkirklions commented 6 years ago

Error is:

line 234, in _locateAll_python
    raise StopIteration()
StopIteration

there are no problems in Python 3.6 on 32bit. I confirmed on multiple programs that the image is there and that these work on the previous version.

This is a new error that just started happened when I upgraded to 3.7 on 64 bit.

One more error that is showing during the shell screen:

Python37\lib\site-packages\pyscreeze\__init__.py", line 250, in locate
    points = tuple(locateAll(needleImage, haystackImage, **kwargs))
RuntimeError: generator raised StopIteration
mkirklions commented 6 years ago

Not sure if this is a hack, but I got it working by changing the line that says:

raise StopIteration()

to

return

Thanks for the helpful package!