PokerVision icon indicating copy to clipboard operation
PokerVision copied to clipboard

Problems with mss

Open ferfolmer opened this issue 2 years ago • 3 comments

Hey, whatsup! I tried to run the program, but had the following error:

(venv) venv λ › python3 grab_table.py
sh: 1: wmctrl: not found
Traceback (most recent call last):
  File "/home/fernando/PokerVision/scripts/grab_table.py", line 20, in <module>
    sct.grab(monitor).rgb)
  File "/home/fernando/PokerVision/venv/lib/python3.10/site-packages/mss/base.py", line 90, in grab
    screenshot = self._grab_impl(monitor)
  File "/home/fernando/PokerVision/venv/lib/python3.10/site-packages/mss/linux.py", line 427, in _grab_impl
    ximage = self.xlib.XGetImage(
  File "/home/fernando/PokerVision/venv/lib/python3.10/site-packages/mss/linux.py", line 229, in _validate
    raise ScreenShotError(f"{func.__name__}() failed", details=details)
mss.exception.ScreenShotError: XGetImage() failed

Could be a size problem or something?

ferfolmer avatar Jun 06 '23 01:06 ferfolmer

Do you run it on Linux?

wb-08 avatar Jun 06 '23 05:06 wb-08

Yes, on Ubuntu 22.04

ferfolmer avatar Jun 06 '23 11:06 ferfolmer

Maybe it can help you - https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/ otherwise you need reduce the resolution of the screen (:

wb-08 avatar Jun 12 '23 13:06 wb-08