开发者

Ambiguous pywintypes.error when calling win32gui.GetPixel()

So here's the line of code triggering the error:

win32gui.GetPixel(win32gui.GetDC(self._hwndGame), x, y开发者_开发技巧)

Here's the error:

pywintypes.error: (0, 'GetPixel', 'No error message is available')

I'm not sure how to interpret this error or where to begin resolving it. Any ideas at all would be greatly appreciated.


I may have accidentally solved my problem. It seems the error (in this case) is thrown when trying to GetPixel() for a device that doesn't support "color management." Either that or I was trying to GetPixel() outside the bounds of the window's dimensions. Both cases seemed to cause this error. This is just a hunch as to how I solved it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜