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

Get dotnet error during execution #6

Closed
user041071 opened this issue Jun 15, 2020 · 2 comments
Closed

Get dotnet error during execution #6

user041071 opened this issue Jun 15, 2020 · 2 comments

Comments

@user041071
Copy link

user041071 commented Jun 15, 2020

Hi!

I am seeking your help today as I see the following error when executing :

dotnet PgsToSrt.dll --input /video/input/Sieben.mkv --track 3 --output /video/input/test.srt
PgsToSrt 1.1.0.0

2020/06/15 10:09:20.485|INFO|Detected tesseract language data for language 'deu'.
2020/06/15 10:09:21.191|INFO|Starting OCR for 1729 items...
2020/06/15 10:09:21.244|ERROR|Error: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at Tncl.NativeLoader.NativeInstance.CreateInstance[T](NativeLoader loader)
at Tesseract.Interop.TessApi.Initialize(NativeLoader loader) in /root/PgsToSrt/Tesseract/Interop/BaseApi.cs:line 355
at Tesseract.TesseractEngine..ctor(String datapath, String language, EngineMode engineMode, IEnumerable1 configFiles, IDictionary2 initialOptions, Boolean setOnlyNonDebugVariables) in /root/PgsToSrt/Tesseract/TesseractEngine.cs:line 66
at PgsOcr.DoOcr() Exception has been thrown by the target of an invocation.

My system details are:

[root@nvidia out]# tesseract --version
tesseract 3.04.00
leptonica-1.72
libgif 4.1.6(?) : libjpeg 6b (libjpeg-turbo 1.2.90) : libpng 1.5.13 : libtiff 4.0.3 : zlib 1.2.7 : libwebp 0.3.0

[root@nvidia out]# uname -a
Linux nvidia.home 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

[root@nvidia out]# dotnet --version
2.1.807

Do you have any idea about the root cause?
Am I missing something?

BR

@Tentacule
Copy link
Owner

I think you have installed the tesseract application instead of the library.
libtesseract3 needs to be installed (sudo apt install libtesseract3)

@user041071
Copy link
Author

Hi !

Sorry for the late response.
I figured it out. Was due to CentOS not having a libtesseract3 package.
I switched to Ubuntu and followed your advise.
It works now.

Many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants