[1.1.1] runScript: parameters should be allowed to be everything, not only strings --- not accepted

Bug #1744895 reported by RaiMan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Won't Fix
Undecided
RaiMan

Bug Description

**** will not fix decision:

According to the Python conventions, sys.argv is a list of simple strings, since it represents the parameters given on a commandline when running the script.

For the internal use of runScript you can turn any parameter in the main script to a string using str(parameter) or other methods.

In the target script you can use eval(parameter) to bring back a parameter to its original type (e.g. tupel, list, dictionary, ...)

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

I met below error when try to use sys.argv[] on sikuli IDE 1.1.1

I am try to parse below array to another script in IDE

Settings.DebugLogs=True
pt1=("25","225")
pt2=("25","235")
pt3=("127.5","25")
mylist=(pt1,pt2,pt3)
print mylist
runScript("D:/KT_Work/Sikuli/tempTest.sikuli",mylist)

and "D:/KT_Work/Sikuli/tempTest.sikuli" is as

myList=sys.argv[1]
print sys.argv[1]

but error display as

[error] Error caused by: Traceback (most recent call last): File "D:\KT_Work\Sikuli\5xx.sikuli\5xx.py", line 24, in <module> runScript("D:/KT_Work/Sikuli/tempTest.sikuli",pt1) File "D:\KT_Work\Sikuli1.1.1\NewSikuli\sikulix.jar\Lib\sikuli\Sikuli.py", line 559, in runScript TypeError: run(): 2nd arg can't be coerced to String[]

What is the error?

RaiMan (raimund-hocke)
Changed in sikuli:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.2
RaiMan (raimund-hocke)
Changed in sikuli:
status: Fix Committed → Won't Fix
importance: High → Undecided
milestone: 1.1.2 → none
RaiMan (raimund-hocke)
description: updated
summary: [1.1.1] runScript: parameters should be allowed to be everything, not
- only strings
+ only strings --- not accepted
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.