Skip to content
This repository has been archived by the owner on Mar 14, 2018. It is now read-only.

Error in App.open failed: C:/Program not found on Windows Machine #269

Open
AnandSingh314 opened this issue Jun 9, 2017 · 4 comments
Open
Labels

Comments

@AnandSingh314
Copy link

On Windows machine program/process will be in C:/Program Files (x86)/.... The absolute path could have space in between. The windows implementation of OSUtil class which is WinUtil class is causing issue since it is taking the full process same in a single string, & later separating the parameters with space separator logic.

I would suggest for taking the process/program name separately while creating the App object.

[debug] RunTimeAPI: loadLib: WinUtil.dll
[debug] WinUtil.getApp: C:/Program Files (x86)/Cisco/Cisco AnyConnect Secure Mobility Client/vpnui.exe
[debug] App.create: [-1:C:/Program]
true
[debug] WinUtil.getApp: C:/Program
false
[debug] WinUtil.getApp: C:/Program
[debug] WinUtil.getApp: 10504
[error] App.open failed: C:/Program not found
[debug] highlight R[139,395 433x394]@s(0)[0,0 1920x1080] E:Y, T:3.0 for 2.0 secs
app.isValid() => false
app.window() => null
app.isRunning() => false
app.getName() => C:/Program
[debug] RunTimeAPI: final cleanup
[debug] FileManager: deleteFileOrFolder:

@glitchassassin
Copy link

Does this work?

App('"C:/Program Files (x86)/Cisco/Cisco AnyConnect Secure Mobility Client/vpnui.exe"')

@HelioGuilherme66
Copy link

This is how I start my app:

import subprocess
subprocess.Popen(["C:\\Program Files\\Internet Explorer\\iexplore.exe", "http://my.URL.under.test/"])

@glitchassassin
Copy link

You should be able to use:

t = App.open('"C:\\Program Files\\Internet Explorer\\iexplore.exe" http://my.URL.under.test/')

I think the general rule is "if it works on the command line, it should work with App.open()". In this case, put double quotes around the path/executable name so it's recognized as a single token.

@RaiMan
Copy link
Owner

RaiMan commented Jun 10, 2017

I have to check.
App should interpret the given string or even list/array of strings as Python's subprocess.Popen does it.

@RaiMan RaiMan added the bug label Jun 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants