Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以这是触发错误的代码行:
win32gui.GetPixel(win32gui.GetDC(self._hwndGame), x, y)
这是错误:
pywintypes.error: (0, 'GetPixel', 'No error message is available')
我不确定如何解释这个错误或从哪里开始解决它。任何想法都将不胜感激。
我可能不小心解决了我的问题。尝试 GetPixel() 用于不支持“颜色管理”的设备时,似乎会引发错误(在这种情况下)。要么就是我试图 GetPixel() 超出窗口尺寸的范围。这两种情况似乎都导致了这个错误。这只是我如何解决它的预感。