← Back to team overview

sikuli-driver team mailing list archive

[Bug 1608693] [NEW] shutil.move(pic, sfile) returns error in 1.1.1

 

Public bug reported:

This script works in SikuliX 1.1.0.  I get a screenshot named
"OSX10.11.5 2016-08-01 15.11.10 Empty checkbox not found left of Reduce Transparency"

In 1.1.1 I get this error which seems to not like the parms in shutil.move(pic,sfile) where the
script reads as below.  Not sure what changed here???
############################## Script ###########################
def snapit(msg):
    bounds = getBounds()
    pic = Screen(0).capture(bounds)
    print("snapshot taken, + msg")
    msg = msg.rstrip("\n")
    sfile = path + "OSX10.11.5 " + time.strftime("%Y-%m-%d %H.%M.%S ") + msg + ".png"
    shutil.move(pic,sfile)
############################### LOG #############################
[log] ( ⌘+⌥ ) TYPE "h"

[log] App.open [2990:System Preferences]

2016-08-01 15\:15\:01, Dragged System Preferences Window to top

[log] CLICK on L(1738,448)@S(0)[0,0 1920x1080] (581 msec)
2016-08-01 15\:15\:02, Clicked on Accessibility

2016-08-01 15\:15\:06, Empty checkbox not found left of Reduce
Transparency

snapshot taken, + msg
[error] script [ mac10-11-onboard ] stopped with error in line 536
[error] TypeError ( coercing to Unicode: need string, org.sikuli.script.ScreenImage type found )
[error] --- Traceback --- error source first
line: module ( function ) statement 
293: shutil ( move ) File "/Users/joe/SikuliX-1.1.1/SikuliX.app/Contents/Java/sikulix.jar/Lib/shutil.py", line 293, in move
22: main ( snapit ) shutil.move(pic,sfile)
172: main ( clickitdir ) snapit(msg)
318: main ( reducetrans ) rc = clickitdir(reducet,desc,"left",echkbox,desc2,75)
[error] --- Traceback --- end --------------

** Affects: sikuli
     Importance: Undecided
         Status: New

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

Title:
  shutil.move(pic,sfile) returns error in 1.1.1

Status in Sikuli:
  New

Bug description:
  This script works in SikuliX 1.1.0.  I get a screenshot named
  "OSX10.11.5 2016-08-01 15.11.10 Empty checkbox not found left of Reduce Transparency"

  In 1.1.1 I get this error which seems to not like the parms in shutil.move(pic,sfile) where the
  script reads as below.  Not sure what changed here???
  ############################## Script ###########################
  def snapit(msg):
      bounds = getBounds()
      pic = Screen(0).capture(bounds)
      print("snapshot taken, + msg")
      msg = msg.rstrip("\n")
      sfile = path + "OSX10.11.5 " + time.strftime("%Y-%m-%d %H.%M.%S ") + msg + ".png"
      shutil.move(pic,sfile)
  ############################### LOG #############################
  [log] ( ⌘+⌥ ) TYPE "h"

  [log] App.open [2990:System Preferences]

  2016-08-01 15\:15\:01, Dragged System Preferences Window to top

  [log] CLICK on L(1738,448)@S(0)[0,0 1920x1080] (581 msec)
  2016-08-01 15\:15\:02, Clicked on Accessibility

  2016-08-01 15\:15\:06, Empty checkbox not found left of Reduce
  Transparency

  snapshot taken, + msg
  [error] script [ mac10-11-onboard ] stopped with error in line 536
  [error] TypeError ( coercing to Unicode: need string, org.sikuli.script.ScreenImage type found )
  [error] --- Traceback --- error source first
  line: module ( function ) statement 
  293: shutil ( move ) File "/Users/joe/SikuliX-1.1.1/SikuliX.app/Contents/Java/sikulix.jar/Lib/shutil.py", line 293, in move
  22: main ( snapit ) shutil.move(pic,sfile)
  172: main ( clickitdir ) snapit(msg)
  318: main ( reducetrans ) rc = clickitdir(reducet,desc,"left",echkbox,desc2,75)
  [error] --- Traceback --- end --------------

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


Follow ups