blaisewang / img2latex-mathpix

Mathpix has changed their billing policy and no longer has free monthly API requests. This repo is now archived and will not receive any updates for the foreseeable future.
Apache License 2.0
1.39k stars 209 forks source link

[Bug] No clipboard image found #93

Open su-stephen opened 4 years ago

su-stephen commented 4 years ago

Describe the bug I'm getting a no clipboard image found bug

To Reproduce I take a screenshot with the default mac app that transfers to clipboard and then press "enter", but I get the error message. I am able to paste afterwards into microsoft word but the program doesn't pick up the clipboard

Desktop (please complete the following information): Mac

Thanks!!

github-actions[bot] commented 4 years ago

[Auto response] Looks like this is your first issue. I will look into it as soon as possible.

blaisewang commented 4 years ago

Which snip app are you using? I am using the macOS as while and I can paste the images captured by macOS built-in snip function. Try Shift (⇧)-Control (⌃)-Command (⌘)-4 .

su-stephen commented 4 years ago

Yes I am doing the same built-in "copy picture of selected area to the clipboard" mac built in snipping function with that shortcut.

Let me know if there's any other information I can supply. I am using the latest version of the app

blaisewang commented 4 years ago

Check macOS preferences - Security & Privacy - Input Monitoring. Have you granted this permission to an app called 'java'?

blaisewang commented 4 years ago

I use the same procedure to test the problem as you described. But I cannot reproduce the same result. I would guess this might be a permission problem? A workaround solution might be pasting the image into Microsoft Word and then copy the image from Microsoft Word then press the 'enter'.

blaisewang commented 4 years ago

Check other permissions in the Security & Privacy to see if there is any permission you haven't granted to the java app.

wang-xudong commented 4 years ago

The question has been solved, it may not be the problem of the software, and the question should because of the network, when I use a vpn, the question doesn't appear anymore.

Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ 2020年10月8日星期四晚上6点19分,Blaise Wang notifications@github.com 来信:

Check macOS preferences - Security & Privacy - Input Monitoring. Have you granted this permission to an app called 'java'?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

su-stephen commented 4 years ago

Yes the problem is alleviated by first pasting the image into microsoft word! So that means it's a permissions issue? I tried enabling both java and the Image2Latex App in input monitoring/accessibility permissions but still wasn't able to circumvent the issue

blaisewang commented 4 years ago

Yes the problem is alleviated by first pasting the image into microsoft word! So that means it's a permissions issue? I tried enabling both java and the Image2Latex App in input monitoring/accessibility permissions but still wasn't able to circumvent the issue

I am not sure. Might be the permission issue. Do you have any other application that might alter your clipboard?

su-stephen commented 4 years ago

I don't think I have any other application but I will think about if there are any other conflicting issues

blaisewang commented 4 years ago

Do you have Python 3 installed on your mac? Please take a screenshot first, then run the following code, and then test whether the screenshot can be used for OCR with the app. If not, please upload the debug.data generated by the following code. Pillow needs to be installed to run the code, python3 -m pip install Pillow.

from PIL import ImageGrab

im = ImageGrab.grabclipboard()
with open("debug.data", "wb") as f:
    f.write(im.tobytes())
blaisewang commented 4 years ago

Try this version to see if the issue still occurs?

https://github.com/blaisewang/img2latex-mathpix/releases/download/v0.7.8-alpha/Image2LaTeX-0.7.8-macos.zip

su-stephen commented 4 years ago

debug.data.zip Hi. Unfortunately the issue still occurs. Here is the debug data

Thank you!

hayriokcu commented 3 years ago

Hello I also have the same issue. I use Dropbox whenever I take a screenshot by Cmd+Shift+4 it gives me the dropbox access link to my clipboard. I think it is not possible to solve this problem.

For this reason I use 3rd party program Lightshot and assign another key just for İmage2Latex. However it doesn't copy to clipboard automatically. I need to use the manual option only which is very annoying.

Thanks for your interest in advance.

acelik commented 3 years ago

Try this version to see if the issue still occurs?

https://github.com/blaisewang/img2latex-mathpix/releases/download/v0.7.8-alpha/Image2LaTeX-0.7.8-macos.zip

Hello, I am having the same issue on high sierra. I tried suggestions above but the problem still persists. I have the 0.7.8 version on my other MacBook and the app is just working great. Also, the link above for the latest version seems not working.

acelik commented 3 years ago

Has anyone somehow overcome this issue? Running it on High Sierra.

guomengran commented 3 years ago

不能连续使用,识别一张截图后,再次截图时图片导入不进去,只能退出软件重新进入,怎么解决?另选择图片导入(MacBook Pro 13-inch, 2018, Four Thunderbolt 3 Ports 11.0.1)

guomengran commented 3 years ago

我使用相同的程序来测试您描述的问题。但我无法重现相同的结果。我猜这可能是权限问题?解决方法可能是将图像粘贴到 Microsoft Word 中,然后从 Microsoft Word 复制图像,然后按“输入”。

“输入”是哪个按钮?

acelik commented 2 years ago

Seems like no solution or workaround yet :(