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

obsidian can't use tesseract and imagemagick #40

Open
Neptune10000 opened this issue Jun 14, 2023 · 14 comments
Open

obsidian can't use tesseract and imagemagick #40

Neptune10000 opened this issue Jun 14, 2023 · 14 comments
Labels
bug Something isn't working MacOS

Comments

@Neptune10000
Copy link

Hi,

I am trying to use obsidian-ocr on my obsidian. I am using MacOS. So I installed "tesseract", "tesseract-lang" and "imagemagick" as you suggested. But it seems obsidian can't recognize that the dependencies had installed. and when i trying to open"ORC PDF" or change "ORC provider" to tesseract. It gives following error.

Would you help me with this issue?

CleanShot 2023-06-15 at 07 39 47@2x

@Neptune10000
Copy link
Author

So here are some details.
my system is macOS 12.2.1
obsidian version is 1.3.5
obsidian-ocr with the newest version 2.0.0

I installed the following dependencies on these location:
CleanShot 2023-06-15 at 07 41 31@2x

I wrote these path in /private/etc/paths:
CleanShot 2023-06-15 at 07 42 28@2x

And I tried to write paths in ~/.bash_profile:
CleanShot 2023-06-15 at 07 42 57@2x

These tools can be used in the command line. But it seems obsidian can't recognize them. Would you help me to find out where the error is?
Thank you for your help~

@MohrJonas MohrJonas added bug Something isn't working MacOS labels Jun 15, 2023
@MohrJonas
Copy link
Owner

Sure let's find out what's wrong 😃
The best way for me to know what's going wrong is with a log file.
Could you please do the following:

  • Go to the settings page for obsidian-ocr in Obsidian
  • Enable the setting Log to file
  • Perform the same steps you did to get the messages in the first image
  • Close Obsidian
  • You should now be able to find a log file called obsidian-ocr.log in your vault
  • Paste the content into a text-sharing page, preferably a GitHub gist and send me the link

@Neptune10000
Copy link
Author

Hi, I am back. Thanks for your reply.
I think here are something you want.

https://gist.github.com/Neptune10000/9d1afbad383ad9b7426d3e190605d611

@MohrJonas
Copy link
Owner

Thanks, that log looks good. Just so I get this right, you installed tesseract and imagemagick through homebrew?

@joshuadanpeterson
Copy link

joshuadanpeterson commented Sep 2, 2023

I'm also getting the same messages after doing the same things as OP. This is what the developer console looks like:
Screenshot 2023-09-02 at 01 15 18

And yes, I installed tesseract and imagemagick through homebrew

Here is a link to a gist with my log info from when I did those actions:

https://gist.github.com/joshuadanpeterson/1b97ad89aed99ab5df6ed029668f43e6

@MohrJonas
Copy link
Owner

Hmm, interesting.
Could you check if the folder "/opt/homebrew/bin" exists on your system?

@AmalLuke
Copy link

I have the same issue, seems like "/opt/homebrew/bin" is for new Macs, M1. and above Old Intel Macs use 'usr/local/.." that could be the issue, but I am not sure. I tried several times, and also .zshrc ,~/.zprofile sometime you have to add paths to both. So if any solution is found, it would be great to know.

@joshuadanpeterson
Copy link

Hmm, interesting. Could you check if the folder "/opt/homebrew/bin" exists on your system?

@MohrJonas It does not exist on my system. Homebrew is located in /usr/local/bin/brew

@MohrJonas
Copy link
Owner

I see may I ask if it's an m1 based machine?

@joshuadanpeterson
Copy link

it's not. It's a 2019 intel macbook pro

@MohrJonas
Copy link
Owner

Oh okay, so that might be the issue. I assume you can run tesseract from the command line? If so can you check where the binary is located? (I assume which tesseract works on MacOS as well?)

@joshuadanpeterson
Copy link

It's located at /usr/local/bin/tesseract

@evilgeniuschronicles
Copy link
Contributor

@MohrJonas I have a Mac on which I can try to duplicate this. @Neptune10000 and @joshuadanpeterson if I can't replicate can I reach out to y'all directly?

@joshuadanpeterson
Copy link

@MohrJonas I have a Mac on which I can try to duplicate this. @Neptune10000 and @joshuadanpeterson if I can't replicate can I reach out to y'all directly?

Yes, that's fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working MacOS
Projects
None yet
Development

No branches or pull requests

5 participants