← Back to team overview

sikuli-driver team mailing list archive

[Question #694687]: OCR Global settings not updated after setting Settings.OcrLanguages.o

 

New question #694687 on Sikuli:
https://answers.launchpad.net/sikuli/+question/694687

I'm working with SIKULIX IDE 2.0.4 on Windows 7, and I would like to test OCR with french language.

I have the following code (OCR.py)

print "Before  changing language:" + Settings.OcrLanguage
Settings.OcrLanguage= "fra"
print "After changing language :" + Settings.OcrLanguage
print OCR.status()
exit (0)

I run the program with SIKULIX IDE.
The result is

Before changing language:eng
After changing language:fra
None
Global settings OCR.Options:
data = null
language(eng) oem(3) psm(3) height(15,1) factor(1,99) dpi(96)
variables: user_defined_dpi:300
[info] Exit code: 1

and if I run a second time the same program with SIKULIX IDE, I have

Global settings OCR.Options:
data = null
language(fra) oem(3) psm(3) height(15,1) factor(1,99) dpi(96)
variables: user_defined_dpi:300
[info] Exit code: 1
Before changing language:eng
After changing language:fra
None

After the second run (and after all other runs), the language is correct (fra) in the OCR global settings.

I've got 2 questions:
- In the first run, why the language in OCR global settings does not change ?
- In the second run, why is there is mix in the order of the outputs ?

Thanks a lot for your answer.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.