Closed ghost closed 2 years ago
Please use text for reports: the program and the messages. I don't want to type in your program from the video.
Try first without mss. Is there any error then?
Please use text for reports: the program and the messages. I don't want to type in your program from the video.
Try first without mss. Is there any error then?
from pyvirtualdisplay import Display
try:
disp = Display().start()
except Exception as e:
disp.stop()
print(e)
else:
disp.stop()
print("Ok!")
Seems like that is mss issue then, also ImageGrab for Screenshot example listed on README.md doesn't work on Linux because it requires windows or mac to do so. (ImportError: ImageGrab is macOS and Windows only)
Log Error Captured By Google Colab:
Check https://github.com/ponty/pyscreenshot/issues/79
MSS was designed for X desktop and it reuses the display. It doesn't like if X is destroyed.
For screenshot I recommend Pillow. My lib pyscreenshot
can also be used.
If you get this error message on Linux then your Pillow version is old.
ImportError: ImageGrab is macOS and Windows only
https://user-images.githubusercontent.com/59511669/107593275-c024f200-6bed-11eb-9da6-8c294cd3c731.mp4
Google Colab's Black Screenshot of Death: