ianzhao05 / textshot

Python tool for grabbing text via screenshot
MIT License
1.73k stars 259 forks source link

ERROR: Unable to read text from image, did not copy #59

Open matclab opened 1 year ago

matclab commented 1 year ago

On recent Arch linux with i3wm window manager I often get ERROR: Unable to read text from image, did not copy.

I have :

matclab commented 1 year ago

Trying in venv with exact dependencies from requirements.txt doesn't solve the problem.

Modifying getWindow to save image show that the grabWindow function return an all black image.

    def getWindow(self):
        res = self._screen.grabWindow(0)
        res.save("/tmp/a.png", "PNG")
        return res
matclab commented 1 year ago

Note that it sometimes work, but I didn't find a common scenario. I'll try to investigate more.

I tried with and without compositor (picom) but it doesn't improve the situation.