← Back to team overview

sikuli-driver team mailing list archive

[Bug 1216338] [NEW] [1.0.1] NameError ( name 'FindFailed' is not defined ) -- workaround

 

Public bug reported:

----- workaround:

either add
import org.sikuli.script.FindFailed as FindFailed

at the beginning of the script 
or use a plain except: without mentioning FindFailed

----------------------------------------------------------

Hello!
I've just downloaded the newest version of Sikuli - 1.0.1. I'm glad many work has been done (though saving the project doesn't work sometimes, as in the previous versions), now I don't need to click a few times on the sikuli-ide to have it finally opened. I really appreciate your work!

However, I have a problem with try except blocks. When I open my
project, run it and it doesn't find an object to click on, it stops and
I get

[error] NameError ( name 'FindFailed' is not defined )

It occures in the line where I want the script to double click on
something. This part of my code in short looks like that:

try:
 doubleClick(photo)
except FindFailed:
 exit()

I'm really dying to get to know the problem and solve it because it's
quite important for my work.

Greetings,
Daniel

EDIT:
Just to make sure there are no qustions about that - it all worked well with the previous version.

** Affects: sikuli
     Importance: High
     Assignee: RaiMan (raimund-hocke)
         Status: Fix Committed

** Changed in: sikuli
       Status: New => Fix Committed

** Changed in: sikuli
   Importance: Undecided => High

** Changed in: sikuli
     Assignee: (unassigned) => RaiMan (raimund-hocke)

** Changed in: sikuli
    Milestone: None => 1.1.0

** Description changed:

+ ----- workaround:
+ 
+ either add
+ import org.sikuli.script.FindFailed as FindFailed
+ 
+ at the beginning of the script 
+ or use a plain except: without mentioning FindFailed
+ 
+ ----------------------------------------------------------
+ 
  Hello!
  I've just downloaded the newest version of Sikuli - 1.0.1. I'm glad many work has been done (though saving the project doesn't work sometimes, as in the previous versions), now I don't need to click a few times on the sikuli-ide to have it finally opened. I really appreciate your work!
  
  However, I have a problem with try except blocks. When I open my
  project, run it and it doesn't find an object to click on, it stops and
  I get
  
  [error] NameError ( name 'FindFailed' is not defined )
  
  It occures in the line where I want the script to double click on
  something. This part of my code in short looks like that:
  
  try:
-  doubleClick(photo)
+  doubleClick(photo)
  except FindFailed:
-  exit()
+  exit()
  
  I'm really dying to get to know the problem and solve it because it's
  quite important for my work.
  
  Greetings,
  Daniel
  
  EDIT:
  Just to make sure there are no qustions about that - it all worked well with the previous version.

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1216338

Title:
  [1.0.1] NameError ( name 'FindFailed' is not defined ) -- workaround

Status in Sikuli:
  Fix Committed

Bug description:
  ----- workaround:

  either add
  import org.sikuli.script.FindFailed as FindFailed

  at the beginning of the script 
  or use a plain except: without mentioning FindFailed

  ----------------------------------------------------------

  Hello!
  I've just downloaded the newest version of Sikuli - 1.0.1. I'm glad many work has been done (though saving the project doesn't work sometimes, as in the previous versions), now I don't need to click a few times on the sikuli-ide to have it finally opened. I really appreciate your work!

  However, I have a problem with try except blocks. When I open my
  project, run it and it doesn't find an object to click on, it stops
  and I get

  [error] NameError ( name 'FindFailed' is not defined )

  It occures in the line where I want the script to double click on
  something. This part of my code in short looks like that:

  try:
   doubleClick(photo)
  except FindFailed:
   exit()

  I'm really dying to get to know the problem and solve it because it's
  quite important for my work.

  Greetings,
  Daniel

  EDIT:
  Just to make sure there are no qustions about that - it all worked well with the previous version.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1216338/+subscriptions


Follow ups

References