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 208 forks source link

[Bug] Content not found #96

Closed isping closed 2 years ago

isping commented 4 years ago

Describe the bug error msg: Content not found it worked fine before today. I don't know what caused this matter.

To Reproduce Steps to reproduce the behavior: 正常复制粘贴,手动submit,返回提示信息:Content not found.

Expected behavior 反回出错。以前一直正常。

Screenshots d

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

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

Content not found 的报错是 mathpix 返回的,截取的图片确认不是空白的吗?或者分辨率太低?

isping commented 4 years ago

图片确认不是空白的,以前一直是这样用都是可以的,我用mathpix官方的软件,同样的截图没有问题,可以识别。

blaisewang commented 4 years ago

电脑中装有 Python 3 吗?麻烦先截图,然后运行以下代码,然后测试截图是否可以使用 app 进行 OCR。如果不行,麻烦上传以下 Python 代码运行之后生成的 debug.data 文件。代码运行需要安装 Pillow ,python3 -m pip install Pillow

from PIL import ImageGrab

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

debug.zip

python3 下面是使用官方app可以返回正常的公式 无标题

blaisewang commented 4 years ago

麻烦这次运行以下代码,并同样把 debug.data 上传上来。

from PIL import ImageGrab

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

debug.zip 运行代码返回信息: 175974 (422, 139) RGB

blaisewang commented 4 years ago

试下这个版本,还会不会出现同样的问题 https://github.com/blaisewang/img2latex-mathpix/releases/download/v0.7.8-alpha/Image2LaTeX-0.7.8-windows.zip

isping commented 4 years ago

还是同样的错误 还有一个问题,就是我将图像复制到粘贴板的时候,Image2Latex软件Clipboard Image显示也是空白的,使用空格键提交不起作用,都要用submit提交。前段时间是好用,最近就不行了,不知道啥引起的。

isping commented 4 years ago

试了另外一些文档,有的是成功的。 可能原因是,有的文档截图后clipboard image区域里并没有显示,发送了空的数据到服务器?不过同样的文档,用mathipx就没问题,因为mathipx是有自己的截图工具。

Broduker commented 3 years ago

我最近也遇到了相同的问题 之前用还正常

IsumiAlice commented 3 years ago

今天剛開始使用,也遇到了類似的問題,個人發現和截圖程式有關,我用 Snipaste2.3.0 會出錯,但 Tim 自帶的截圖 ok

blaisewang commented 3 years ago

我尝试了数周,还是没办法复现这个问题,但是上面给出的 debug data 确实报相同的错误,目前没有进展

chenkaiwenguo commented 3 years ago

我期盼更新能解决这个问题,但是到目前还是不行,总是出现错误提示,请问是什么原因导致的,有什么办法可以解决吗

------------------ 原始邮件 ------------------ 发件人: "blaisewang/img2latex-mathpix" <notifications@github.com>; 发送时间: 2020年11月7日(星期六) 晚上8:37 收件人: "blaisewang/img2latex-mathpix"<img2latex-mathpix@noreply.github.com>; 抄送: "Subscribed"<subscribed@noreply.github.com>; 主题: Re: [blaisewang/img2latex-mathpix] [Bug] Content not found (#96)

我尝试了数周,还是没办法复现这个问题,但是上面给出的 debug data 确实报相同的错误,目前没有进展

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

wtbsw commented 3 years ago

我也遇到了同样的问题,使用snipaste的截图无法识别,但是qq截图可以,我最后使用Lightshot,它的截图也能识别,感觉是snipaste 的问题。

LCHSuper commented 3 years ago

感觉应该是snipaste的问题,换个截图软件就任何问题都没有了,希望开发者可以做一下与snipaste截图的适配,感谢感谢!

zhongfly commented 3 years ago

在Snipaste的issue中,Snipaste的开发者分析认为是img2latex-mathpix 使用 JavaFX 读取剪贴板图像导致的问题。 参考 https://stackoverflow.com/questions/48932575/getting-image-from-clipboard-awt-vs-fx @blaisewang 希望开发者能进一步解决该问题

blaisewang commented 3 years ago

在Snipaste的issue中,Snipaste的开发者分析认为是img2latex-mathpix 使用 JavaFX 读取剪贴板图像导致的问题。 参考 https://stackoverflow.com/questions/48932575/getting-image-from-clipboard-awt-vs-fx @blaisewang 希望开发者能进一步解决该问题

确实 JavaFX 有很多问题,而且也不是一个主流的图形库,至少从目前看来并不能满足这个 App 非常简单的需求。我已经考虑在用其他语言重写这个 App 了,来实现一些呼声较高但是由于 Java 语言本身限制做不到的 feature,比如 #94 ,可惜目前工作比较忙,还没时间

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 10 days