← Back to team overview

sikuli-driver team mailing list archive

[Bug 1814427] [NEW] [1.1.4] Python scripting: all([]) function not working --- workaround

 

Public bug reported:

********************** workaround:
import __builtin__ as JY
a = 1
b = 1
if JY.all([a == 1, b == 1]):
    print ("yes")
else:
    print("no")
------------------------------------------

all([]) operator is not working but other operators like any([]) work.
example:

a = 1
b = 1
if all([a == 1, b == 1]):
    print ("yes")
else:
    print("no")

error:
[error] script [ all any test ] stopped with error in line 3
[error] TypeError ( all(): expected 0 args; got 1 )

same script with any([]) operator works:

a = 1
b = 1
if any([a == 1, b == 1]):
    print ("yes")
else:
    print("no")

("yes" is printed)

this is not a problem with Jython i tested both scripts with plain
Jython

i am using SikuliX 1.1.3 for mac

** 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.4

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

Title:
  [1.1.4] Python scripting: all([]) function not working --- workaround

Status in Sikuli:
  Fix Committed

Bug description:
  ********************** workaround:
  import __builtin__ as JY
  a = 1
  b = 1
  if JY.all([a == 1, b == 1]):
      print ("yes")
  else:
      print("no")
  ------------------------------------------

  all([]) operator is not working but other operators like any([]) work.
  example:

  a = 1
  b = 1
  if all([a == 1, b == 1]):
      print ("yes")
  else:
      print("no")

  error:
  [error] script [ all any test ] stopped with error in line 3
  [error] TypeError ( all(): expected 0 args; got 1 )

  same script with any([]) operator works:

  a = 1
  b = 1
  if any([a == 1, b == 1]):
      print ("yes")
  else:
      print("no")

  ("yes" is printed)

  this is not a problem with Jython i tested both scripts with plain
  Jython

  i am using SikuliX 1.1.3 for mac

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


Follow ups