this is a question

** Changed in: sikuli
       Status: New => Invalid

** Converted to question:
   https://answers.launchpad.net/sikuli/+question/246693

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

Title:
  Unable to run .exe file with environment variable

Status in Sikuli:
  Invalid

Bug description:
  Hi RaiMan,

  I wrote a new version of my previous bug. This time I don't use the
  os.environ but subprocess.call.

  Thanks! I very much appreciate your helpfulness in this forum.

  I don't want to hard code the path to the .exe file I want to test in my 
.sikuli file. Our scheduler will run the .exe file through the settings of 
environment variables, without hard coding.
  And we don't want to change the path setting, but only run through an 
environment variable. 
  I wrote the following  script, it works on python but not on sikuli. Would 
you have any alternatives\workarounds?

  #MyApp environment variable is created in system in variables under 
System\Advanced Settings
  # My file path is: C:\2014-03-07(20h30)\bin\MyApp.exe
  #We can run the following script on Python, it's OK
  #We can also run "%MyApp%" on command prompt, it's OK. 

  from sikuli import*
  import os, sys
  import subprocess

  os.system('echo %MyApp%')  #We have the path to environment variable. [GOOD]
  subprocess.call('"%MyApp%"', shell = True) #But we can't run it [BAD]

  We have the following error message (not pasted the whole message):

  'C:\2014-03-07' is not recognized as an internal or external command,
  operable program or batch file.
  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
  at javax.swing.text.FlowView$FlowStrategy.layoutRow(Unknown Source)
  at javax.swing.text.FlowView$FlowStrategy.layout(Unknown Source)
  at javax.swing.text.FlowView.layout(Unknown Source)
  at javax.swing.text.BoxView.setSize(Unknown Source)
  at javax.swing.text.BoxView.updateChildSizes(Unknown Source)
  at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
  at javax.swing.text.BoxView.layout(Unknown Source)
  at javax.swing.text.BoxView.setSize(Unknown Source)
  at javax.swing.text.BoxView.updateChildSizes(Unknown Source)
  at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
  at javax.swing.text.BoxView.layout(Unknown Source)
  at javax.swing.text.BoxView.setSize(Unknown Source)
  at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(Unknown Source)
  at javax.swing.plaf.basic.BasicTextUI.modelToView(Unknown Source)
  at

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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to