sikuli_ruby
sikuli_ruby copied to clipboard
Unable to load unicharset file tessdatatessdata/eng.unicharset
Hi Team,
I am running Jruby (1.7.9) with Cucumber to execute Sikuli scripts (v0.3.0). Based on the error message, I suspect the error is Sikuli based.
The error I am seeing is: "unable to load unicharset file tessdatatessdata/eng.unicharset"
When using IF statements in Sikuli scripts, that are run as a module within cucumber (in the features/support/mymodule.rb) with an example below:
if @screen.exists("c:/Sikuli Image Database/Database/pgadmin_results_exist.png",2) #do the normal flow print "FOUND IT" else print "HIT THE ELSE" #we do the second sequence @screen2 = Sikuli::Screen.new @screen2.click("c:/Sikuli Image Database/Database/pgadmin_no.png") sleep 0.5
When I hit the "else", regardless of what code I put here, if it is Sikuli specifc it throws the error mentioned above. To clarify, if I comment out the Sikuli calls, the print statement from cucumber still works correctly.
After some tedious checking, this issue was nothing more than a incorrectly named image file. It appears wrapping it in the if statement from cucumber caused the error to not be easily interpreted.
Note: For constructing better "if statement" structures with cucumber, I discovered an alternative that is not readily documented. PLEASE IGNORE THE DASHES, THEY ARE SIMPLY THERE BECAUSE THE FORMATTING OF THESE POSTS IS REMOVING THE WHITE SPACE.
if condition -----begin ----------code goes here. -----end else -----begin ----------the else code goes here. -----end
Hi, to solve "unable to load unicharset file tessdatatessdata/eng.unicharset" problem copy file on this adress http://tesseract-ocr.googlecode.com/files/tesseract-2.00.eng.tar.gz to "tessdata" directory
That address is no longer valid, not even http://tesseract-ocr.googlecode.com.