Closed ponty closed 4 years ago
Hello,
Thanks for the detailled report. I think this is fixed on that branch: https://github.com/BoboTiG/python-mss/tree/fix-168-better-xrandr-check
Do you mind trying again using that version :pray: ?
The new behavior will be:
root@150cfe4efd93:/python-mss# xvfb-run -s '-extension RANDR' python3 -c "from mss import mss;mss().shot()"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/python-mss/mss/factory.py", line 41, in mss
return linux.MSS(**kwargs)
File "/python-mss/mss/linux.py", line 231, in __init__
raise ScreenShotError("No Xrandr extension found.")
mss.exception.ScreenShotError: No Xrandr extension found.
General information:
Description
If RANDR extension is missing then
ValueError: NULL pointer access
is thrown. An exception with textRandR extension missing
would be more helpful.The exception in MSS and how other projects handle missing RANDR can be reproduced this way:
2 projects where RANDR extension is checked: