← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #165384]: JRuby: Java NullPointerException if imagefile not found

 

Question #165384 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/165384

Paul Grizzaffi posted a new comment:
Ah, I see. I had not tried it in Java directly (sorry). Thanks again for
your very rapid response!

Also interesting is that I was not getting the "Unable to load
unicharset file tessdatatessdata/eng.unicharset". I was reworking my
example to post it here and now I get that message as well as the
stacktrace.

Could you please post or send me your Java example? Perhaps I'm not
initializing something correctly and that's therefore causing my JRuby
problem.

Also, FWIW, my example is below.

Thanks again!
Paul

require "java"
require "#{ENV["SIKULI_HOME"]}/sikuli-script.jar"

import org.sikuli.script.Region

r = org.sikuli.script.Region.new(0,0, 1000, 1000)

begin
  r.doFind("does_not_exist.png")
rescue java.lang.NullPointerException => e
  puts "exception caught"
end

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.