[1.1.0] sikulix passing arguments --arg not working (use -- arg1 arg2 ...) --- fixed: 2015-04-17

Bug #1444959 reported by saravanan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Fix Committed
Critical
RaiMan

Bug Description

sikulix1.1.0 ubuntu 12.04 and windows 8.1 64 bit.
Earlier in sikuli 1.0.1 we passed arguments through --args to the script. The sys.argv[1] in the python script will be the first argument , sys.argv[2] the second argument and so on.
But in SikuliX 1.1.0 Iam not able to see the value after --args reflected in the variable sys.argv[1].

Revision history for this message
RaiMan (raimund-hocke) wrote : Re: sikulix passing arguments --arg not working --- use -- instead

the --args will no longer be recognized.

instead everything after -- will go to the sys.argv[1..] (as mentioned in the docs for 1.1.0+)

summary: - sikulix passing arguments --arg not working
+ sikulix passing arguments --arg not working --- use -- instead
Changed in sikuli:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
Revision history for this message
saravanan (saran-research) wrote :

Thanks for the reply.

i tried the below commands
./runsikulix -r test2.sikuli --- 10
./runsikulix -r test2.sikuli ---args 10

I used --- instead of --

test2.sikuli :
print sys.argv[1]

The output is -r instead of 10

The command ./runsikulix -h shows the following for user arguments

"------
anything after --
or after something beginning with --
go to script as user parameters (respecting enclosing ")"

But I do not see this working.

Revision history for this message
saravanan (saran-research) wrote :

./runsikulix -r test2.sikuli -- 10
we have tried with the " -- " option also but not working for user input argument.
the output 10 is not printed , instead it shows -r as output.
please suggest us
thankyou

Revision history for this message
RaiMan (raimund-hocke) wrote :

I am sorry, but I have to admit, that when running scripts from command line, the filling of the user args does not work.

If you want to test your script, until this is fixed (probably till tomorrow):

./runsikulix -- 10

and run your script in the IDE

Changed in sikuli:
status: Confirmed → In Progress
importance: Medium → High
status: In Progress → Fix Committed
Revision history for this message
saravanan (saran-research) wrote :

hi,
i have run the script in IDE its works fine, i have got the user argument output, i have not used -r option ,
please any method to display the user defined argument in the command prompt.
thank you.

Revision history for this message
RaiMan (raimund-hocke) wrote :

Just busy fixing the issue.

will work with tomorrow's nightly.

Revision history for this message
RaiMan (raimund-hocke) wrote : Re: sikulix passing arguments --arg not working (use -- arg1 arg2 ...) --- fixed: 2015-04-17

Just started a new build.
Should be available within latest 1 h
Download and run a new setup

Changed in sikuli:
importance: High → Critical
summary: - sikulix passing arguments --arg not working --- use -- instead
+ sikulix passing arguments --arg not working (use -- arg1 arg2 ...) ---
+ fixed: 2015-04-17
summary: - sikulix passing arguments --arg not working (use -- arg1 arg2 ...) ---
- fixed: 2015-04-17
+ [1.1.0] sikulix passing arguments --arg not working (use -- arg1 arg2
+ ...) --- fixed: 2015-04-17
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.