Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCR function cannot be used normally on Linux #12960

Closed
3 tasks done
a15355447898a opened this issue Oct 28, 2024 · 0 comments
Closed
3 tasks done

OCR function cannot be used normally on Linux #12960

a15355447898a opened this issue Oct 28, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@a15355447898a
Copy link
Contributor

a15355447898a commented Oct 28, 2024

ocr功能在linux上面无法正常使用

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

我正在使用archlinux,为了ocr功能安装了下面的包
image
其中的语言识别相关包,安装后位于下面的位置,安装后无需任何设置就可以被tesseract所识别
image

tesseract --list-langs可以正确的检测到语言包,不论我是否设置下面的环境变量
image
image

tesseract命令在下面的路径可以被找到
image

我也尝试过使用sudo ln -s /usr/bin/tesseract /usr/local/bin/tesseract/usr/local/bin/目录下也有tesseract命令
因为我看到siyuan源码有一处硬编码的路径
image

思源的启动日志中,我可以看到tesseract已经被正确的检测

image

但是我在实际使用思源ocr的时候,看思源右下角的日志,ocr没有任何返回值,正常来讲这里应该会显示ocr出来的文字
image

我尝试阅读源码,构建一个bash命令来进行测试
源码中调用ocr的部分应该是这一行
image
我尝试构建bash命令运行相同含义的代码
image
可以得到正确的ocr输出,但是siyuan上面ocr并没有正常的输出

Expected result

ocr功能应该被正确的运行

Screenshot or screen recording presentation

No response

Version environment

- Version: v3.1.10
- Operating System: archlinux
- Browser (if used):

Log file

system-log.zip

这里面关于ocr的日志,只有思源启动时Tesseract功能被启用,其他什么相关日志都没有

image

More information

No response

@a15355447898a a15355447898a changed the title ocr功能在linux上面使用异常 ocr功能在linux上面无法正常使用 Oct 28, 2024
@88250 88250 self-assigned this Oct 30, 2024
88250 added a commit that referenced this issue Oct 31, 2024
88250 added a commit that referenced this issue Oct 31, 2024
88250 added a commit that referenced this issue Oct 31, 2024
@88250 88250 added the Bug label Oct 31, 2024
@88250 88250 added this to the 3.1.11 milestone Oct 31, 2024
@88250 88250 changed the title ocr功能在linux上面无法正常使用 OCR function cannot be used normally on Linux Oct 31, 2024
@88250 88250 closed this as completed Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants