what exact error does it give?

The environment variables are a pain in the butt, too. On the windows machine I tested with, there were two Path variables. I added to both…

(i had trouble initially because of the way windows forms the paths, backslashes/forwardslashes. Do you have the target.path.replace pattern correct in the template?)

Hiya, I’m not a techie but I’ve been trying to get this to work on Windows 10. When I tried to run the term tesseract in powershell, it gave me an error that looked something likes this (btw I’m aware of the misspelling - it’s just a representation).

Seemingly the powershell had a similar error to Obsidian(?) So I tried to figure out how to run it first there.

Aferwards, I found this medium article which explains how to add System Variables. It looks like it’s working in poweshell for me now! But not in Obsidian (the red image is the error I am still getting).

Anyway, not sure if this was the obvious thing to do, just thought I’d throw in what little I found in case it helps someone :woman_shrugging:. Would be really cool to get it to work in the future.

@joschmit, seems like it could be what you are having issue with as well.

1 Like

This is weird. I successfully installed & used this on one machine (running Xubuntu 18.04). Synced up (including plugins & settings) on my laptop running Mint 20 & I when I try to create a new note from the OCR template I get the following error in the Obsidian console:


main.ts:213 Error with User Template ocr Error: Command failed: /usr/bin/tesseract “$ocr_input” -
/bin/sh: line 1: /usr/bin/tesseract: No such file or directory

at ChildProcess.exithandler (child_process.js:317)
at ChildProcess.emit (events.js:315)
at maybeClose (internal/child_process.js:1048)
at Socket.<anonymous> (internal/child_process.js:439)
at Socket.emit (events.js:315)
at Pipe.<anonymous> (net.js:673)

I’ve verified by copying the tesseract path & pasting into a terminal that it /usr/bin/tesseract is correct. Any suggestions about why it can’t be found?

For anyone here, I would love to get a real plugin created that’s more usable: Searchable OCR

I ended up needing to set the User Function path to

/opt/local/bin/tesseract "$ocr_input" -

If you’re not sure where your tesseract got installed, you can run

type -a tesseract

and the terminal will return the path.

The OCR works pretty well with printed material, completely unusable for handwritten notes, IMO.

I am getting a parse error and the console says
Templater Error: Template parsing error, aborting.
tp.user.ocr is not a function

Any help appreciated
Thanks in advance