Tesseract - Error : Params model::Incomplete line error - runtime-error

Im facing some difficulties while using Tesseract.
First let me present my actual configuration.
Im working on Windows and have this Tesseract version :
tesseract 3.05.00dev
leptonica-1.73
libgif 4.1.6(?) : libjpeg 8d (libjpeg-turbo 1.4.2) : lib
.0.6 : zlib 1.2.8 : libwebp 0.4.3 : libopenjp2 2.1.0
I have added every languages available with the msi installation.
Unfortunately, i am not able to run a conversion with dutch, italian, spanish, and french languages.
Im using the cmd to execute tesseract.
To show you what kind of error i keep having, im going to use a pretty simple example.
When I run that :
tesseract MainMenu.tif result -l deu
I keep having this error endlessly :
Params model::Incomplete line
That is pretty weird and i am unable to spot whats going wrong.
I can convert in any other languages without any trouble.
I have tried to dl the latest .traineddata from github but it doesnt change anyhing.
I have uninstalled and re-installed the soft too.
Using tesseract --list-langs i am able to see deu, fra, spa and ita.
I have been reading the source code from Github, that makes this error message pop. But I cant find what I am doing wrong.
As I said it works just fine with any languages, except those 4.
Hopefully you will have a lead on this one

I got this problem too.
In my case it is because of using the wrong version of trained data file.
I have use https://github.com/tesseract-ocr/tessdata (master).
This is for tesseract 4 (for this date 15/1/2017).
The solution is use this https://github.com/tesseract-ocr/tessdata/tree/3.04.00.
hope this helps.

Related

RMarkdown: how to get english error messages on a localised system

I am writing a vignette in RMarkdown and I want to point out a programming mistake.
listofnumbers <- as.list(1:4)
listofnumbers[2] + listofnumbers[3]
This code snippet produces an error:
Error in listofnumbers[2] + listofnumbers[3] : non-numeric argument
to binary operator
However, I am working on a system localised to German. The error message I get is in German:
Error in listofnumbers[2] + listofnumbers[3]: nicht-numerisches Argument für binären Operator
If anyone renders the vignette themselves that may be good. But to pre-render it with the package I would need the English message.
Also, I do not want to change my system settings permanently to English.
I investigated using an output hook. But I do not know how to translate the German message to English.
I am working on Windows 10.
If the environment variable LANGUAGE is set to en, error messages will be displayed in English. This needs to be in place at the time R starts.
If you are using RStudio, then it starts a new copy of R to process vignettes when you click on Knit, so you can do this in the current session using
Sys.setenv(LANGUAGE="en")
That should also work if the vignette is processed when you build the package as long as you start a new session to do the build. By default devtools::build() and related functions do that.
If you are running RMarkdown within the current session (e.g. by calling rmarkdown::render()) that won't work, because it happens too late. In that case you can use OS features to set the environment variable, or set it in the .Renviron file in your home directory as
LANGUAGE=en
Since you say you are on Windows, you have to do this carefully: Windows doesn't like filenames like .Renviron, and may try to change it to something else.
This method should work if you use R CMD build to build your packages outside of RStudio.

I am getting an error that I do not understand when I try to knit documents on RStudio

I am a relatively new R user. I've been knitting documents in the past using RStudio to create HTML and PDF outputs of my R files.
I have no idea what changed, but approximately 1 month ago I tried to knit a document and got the error portrayed in the picture. I am borderline-competent at R on my best days but otherwise have virtually no knowledge of anything "computer" or "coding" outside of what I've learned from DataCamp regarding R. I have been trying to figure out what happened so that I can continue knitting files, but legitimately do not understand.
I would be more than happy to provide any additional information/context that you need to help me solve this problem but, unfortunately, I just don't know where to start or what's required.
I know this is a bit of a bullshit question and I've tried to avoid asking about it for a while b/c I know I don't know enough to ask it correctly, but I'm at a point where I just want to start knitting again and I'll do whatever it takes to get back to that!
The things I've tried so far are:
Downloading and installing the newest version of R
Downloading and installing RStudio again
Downloading and installing MacTeX again
Trying random solutions from Stack Overflow that involve writing things in my "Terminal" (which I subsequently erase when they don't work).
I am using a MacBook Pro running macOS Catalina 10.15.7 for what it's worth.
I've copied and pasted the text of the error message below:
Error in file(filename, "r", encoding = encoding) :
cannot open the connection
Calls: source -> file
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
cannot open file 'renv/activate.R': No such file or directory
Execution halted
I had the same error and didn't want to run my Rmd files from the console, so there is the solution for using the button again (which I found here):
> usethis::edit_r_profile()
* Modify 'C:/Users/User/Documents/.Rprofile'
* Restart R for changes to take effect
The output then shows you the path to your file. Just copy that path to the address bar in your explorer and choose the program you want to open it with. I chose the normal text editor. Delete "source('renv/activate.R.')" from this file, restart R, and everything should work fine again.

I can't get Atom text editor + leiningen + proto-repl to work (for programming Clojure)

Anything that Atom + proto-repl does involves lein, so I decided to check out lein. 'lein help' works, but attempting 'lein repl' gives the following errors:
gw-mac-pro:~ gr$ lein repl
Could not find artifact proto-repl:proto-repl:jar:1.4.24 in central (https://repo1.maven.org/maven2/)
Could not find artifact proto-repl:proto-repl:jar:1.4.24 in clojars (https://repo.clojars.org/)
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Could not resolve dependencies
I get the same set of messages when I attempt to run code from within Atom.
I've searched for hours for any kind of arcana about Atom, lein, or proto-repl, and I'm amazed that searching on 'lein error could not find artifact' continues to find nothing useful.
I'm surprised that no one has encountered this same problem. I'm running on macOS Mojave (10.14.6). Can you help me? Thanks.

Why can't Rserve run?

I want to use R on Qlik, and I began by following this process : https://community.qlik.com/servlet/JiveServlet/previewBody/18785-102-1-25264/Installing%20R%20with%20Qlik%20Sense.pdf
I installed R (with the specific install path, but R-3.4.4), and Qlik (September 2018 version).
Then I followed the different steps, until the 6th.
There, when I run Rserve.exe, I get an error : "Fatal error: unable to open the base package".
However I checked that the base package is well installed.
I didn't find where does it come from.
-> Is it a problem of R or Qlik version ?
-> Or is there someting else to take care of ?
Thank you very much for your advice !
I finally found the answer :
creating an environment variable
calling it R_HOME
value : the path to R (C:\R\R-3.4.4)

premake5: Cannot get the "Hello World" example to generate a Visual Studio solution

I am trying to generate a solution file for the premake5 out of the wiki example.
https://github.com/premake/premake-core/wiki/Your-First-Script
Calling premake5 vs2012 produces the following error -
Error: premake5.lua:2: attempt to call global 'workspace' (a nil value)
Does anyone know how to fix that? It looks like premake5 does not recognize the workspace() function. I followed the installation instructions and assume that I downloaded and unpacked the console utility correctly.
Sounds like you are running an older version of the code. The workspace() call was just introduced and will appear in the next alpha release, which should come out sometime next week. In the meantime, just use solution() instead; your code will still work when the new alpha arrives.

Resources