pyscreenshot icon indicating copy to clipboard operation
pyscreenshot copied to clipboard

[support] I get "all backends failed" after a while - any tips?

Open lowfuel opened this issue 3 weeks ago • 1 comments

Should start by saying I only really know enough to be dangerous re: python and linux.

I've written a script that uses pyscreenshot to take a full screen screenshot every second or so, do some processing, then repeat. This works great for maybe ten or fifteen minutes, but after that I start I get "all backends failed" on each attempt, and it never recovers.

I'm sure this is just something wonky with my OS and/or Window Manager (CachyOS based on Arch, and Wayland).

What I'm wonder is if there's some way to sort of reboot pyscreenshot from within my script? Right now I have to control-C it and start it fresh.

Thanks for any tips!

My code isn't complicated, here's the relevant bits: import pyscreenshot as ImageGrab

img = ImageGrab.grab() np_img = cv2.cvtColor(np.array(img), cv2.COLOR_BGR2GRAY)

lowfuel avatar Dec 17 '25 02:12 lowfuel