-
Notifications
You must be signed in to change notification settings - Fork 16
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
Error during execution #1
Comments
If you are running under linux be sure to have libgdiplus and libtiff installed. I'll probably update the code in the future to have clearer error message. |
Thanks for the reply. I installed: libgdiplus-2.10-10.el7.x86_64 and libtiff-4.0.3-32.el7.x86_64 .. but still is throwing the same error:
Any other lib that is needed? I'm in Centos 7. |
I'm trying to do a docker image using dotnet sdk 2.1 but same error I tried to install from ubuntu package libgdiplus libtiff-dev, any help? if I get this working I will PR a docker image that also download tessdata |
The tesseract nuget package which does the ocr used in this project will also need liblept 1.7.53 and libtesseract 3.05.2 It must be the specified version, I'll probably rework this part to because those versions may not be available as packages for all linux flavor. In that case you'll have to compile them from source, which is not very convinient. |
Trying with a dotnetcore sdk image (ubuntu bionic):
And then folowing the steps to use that version requirements (liblept 1.75.3 and tesseract 3.05):
|
Thanks will test this as soon as I can.
…On Sat, Dec 7, 2019, 7:00 AM sdelrio ***@***.***> wrote:
Trying with a dnetnetcore sdk image (ubuntu bionic):
$ docker pull microsoft-dotnet-core-sdk:2.2-bionic
$ docker run --rm -v /c/Users/sdelrio/Downloads/Telegram\ Desktop/:/mnt -ti mcr.microsoft.com/dotnet/core/sdk:2.2-bionic /bin/bash
And then folowing the steps to use that version requirements (liblept
1.75.3 and tesseract 3.05):
apt-get update
apt install -y libgdiplus libtiff-dev liblept5=1.75.3-3
# https://github.com/tesseract-ocr/tesseract/wiki/Compiling-%E2%80%93-GitInstallation
apt-get <https://github.com/tesseract-ocr/tesseract/wiki/Compiling-%E2%80%93-GitInstallationapt-get> install -y automake ca-certificates g++ git libtool libleptonica-dev=1.75.3-3 make pkg-config
# Optionnal training tools: apt-get install -y libpango1.0-dev
# Tesseeract 3.05
git clone https://github.com/tesseract-ocr/tesseract.git --depth 1 --branch 3.05 --single-branch
cd tesseract
./autogen.sh
./configure
make
make install
ldconfig
# PGTOSTR
cd
git clone --depth 1 --single-branch https://github.com/Tentacule/PgsToSrt
cd PgsToSrt
dotnet restore
dotnet publish -c Release -o out
# download dicts
git clone --depth 1 --branch 3.05 --single-branch https://github.com/tesseract-ocr/tessdata
# Execute dotnet app
dotnet /root/PgsToSrt/PgsToSrt/bin/Release/netcoreapp2.1/PgsToSrt.dll --tesseractdata ./tessdata --input /root/b.sup --output /root/b.srt --tesseractlanguage eng
(...)
2019/12/07 11:54:49.679|INFO|Detected tesseract language data for language 'tgk'.
2019/12/07 11:54:49.679|INFO|Detected tesseract language data for language 'ben'.
2019/12/07 11:54:49.679|INFO|Detected tesseract language data for language 'chi_sim'.
2019/12/07 11:54:49.679|INFO|Detected tesseract language data for language 'tir'.
2019/12/07 11:54:49.679|INFO|Detected tesseract language data for language 'deu'.
2019/12/07 11:54:49.679|INFO|Detected tesseract language data for language 'kat'.
2019/12/07 11:54:49.861|INFO|Starting OCR for 1800 items...
2019/12/07 11:54:49.905|ERROR|Error: Exception has been thrown by the target of an invocation. Exception has been thrown by the target of an invocation.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=AEAUGDBVRZMB7KO76UTZDCTQXOF5LA5CNFSM4JR72AZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGGFLXA#issuecomment-562845148>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEAUGDBKMONA5R3L44NQ5YDQXOF5LANCNFSM4JR72AZA>
.
|
Ok, I found the issue. I don't have time to fix it in the code right now, but as a work-around you can copy liblept.so.5.0.2 and libtesseract.so.3.0.5 in the x64 folder (or x86 depending on your platform) and rename them to liblept1753.so and libtesseract3052.so |
This issue should be fixed in release v1.1.0 |
Hi - Trying to use your script and got the following error:
PgsToSrt 1.0.0.0
2019/11/26 19:57:26.699|INFO|Detected tesseract language data for language 'spa'.
2019/11/26 19:57:26.783|INFO|Detected tesseract language data for language 'eng'.
2019/11/26 19:57:27.011|INFO|Starting OCR for 606 items...
2019/11/26 19:57:27.114|ERROR|Error: Exception has been thrown by the target of an invocation. Exception has been thrown by the target of an invocation.
Not sure how to generate more debug info. Any assistance is appreciated .. Thanks.
The text was updated successfully, but these errors were encountered: