lukas-blecher / LaTeX-OCR

pix2tex: Using a ViT to convert images of equations into LaTeX code.
https://lukas-blecher.github.io/LaTeX-OCR/
MIT License
12.7k stars 1.03k forks source link

latexocr snip window opaque Ubuntu 23.10 #368

Open MathieuFerey opened 8 months ago

MathieuFerey commented 8 months ago

Hi everyone !

I have successfully installed the pix2tex package on conda, but the gui does not work for me. When running the commande "latexocr", the window pops up, but when trying the snip, the snip window is completely opaque (not very convenient you would agree). Snipping anyway, the code just crashes with the error message

"Sandboxing disabled by user. This plugin does not support setting window opacity This plugin does not support setting window opacity Traceback (most recent call last): File "/home/mathieu/miniconda3/envs/pix2tex_env/lib/python3.12/site-packages/pix2tex/gui.py", line 334, in mouseReleaseEvent raise e File "/home/mathieu/miniconda3/envs/pix2tex_env/lib/python3.12/site-packages/pix2tex/gui.py", line 328, in mouseReleaseEvent img = ImageGrab.grab(bbox=(x1, y1, x2, y2), all_screens=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/mathieu/miniconda3/envs/pix2tex_env/lib/python3.12/site-packages/PIL/ImageGrab.py", line 70, in grab size, data = Image.core.grabscreen_x11(xdisplay) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OSError: X get_image failed: error 8 (73, 0, 1173) Abandon (core dumped) "

I am using Ubuntu 23.10, and I am not sure whether my gnome_screenshot is setup wrong. Do you have any idea of what might be the problem ?

Thanks !

giuliofrey commented 8 months ago

Same issue here Ubuntu 23.10

giuliofrey commented 7 months ago

Same issue here Ubuntu 23.10

Fixed by running sudo apt-get install gnome-screenshot As suggested in #249