asweigart / pyscreeze

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

Get Pixel Occured `OverflowError` #83

Closed P-PPPP closed 2 years ago

P-PPPP commented 2 years ago

Hi , I am currently using pyautogui Which using this backend for pixel getting.

windll.gdi32.GetPixel(0, 8, 8)
File "\pyscreeze\__init__.py", line 608, in pixel
    color = windll.gdi32.GetPixel(hdc, x, y)
ctypes.ArgumentError: argument 1: <class 'OverflowError'>: int too long to convert

this would happend when i was trying to capture Top Most Seted Window Pixel I searched Other Issue , But Non of them fits for me.

P-PPPP commented 2 years ago

Some Times I tried to Capture , it would throw this error , but when i retried the same code , ti revives ....