Simple Path Question

Posted on
Mon May 24, 2021 7:09 pm
jltnol offline
Posts: 994
Joined: Oct 15, 2013

Simple Path Question

So this path produces an error:
Code: Select all
subprocess.call(['/Library/Application\ Support/Perceptive\ Automation/Scripts/Shell/LinnJ.sh']),

but this one works:
Code: Select all
subprocess.call(['/Users/kitchen/Desktop/LinnJ.sh']),

Basically, I have a copy of the file in both places, and I'm dropping it into Terminal to get the path, but the first gives me an error. Could this be a permission thing? I've given Indigo and the Indigo Server Full Disc Access....

Posted on
Mon May 24, 2021 7:53 pm
FlyingDiver offline
User avatar
Posts: 7215
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Simple Path Question

Open the Interactive Shell (bottom of plugins menu) and paste in the shell script there. You should get a much more informative error message.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue May 25, 2021 5:14 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Simple Path Question

My guess is that you need to remove the escapes in the path name, but that's only a guess (done in the Indigo Scripting Shell as Joe suggested)..

Code: Select all
Python 2.7.16 (default, Feb 28 2021, 12:34:25)
[GCC Apple LLVM 12.0.5 (clang-1205.0.19.59.6) [+internal-os, ptrauth-isa=deploy
Connected to Indigo Server v2021.1.0, api v2.5 (localhost:1176)
>>> import subprocess
>>> subprocess.call(['/Library/Application\ Support/Perceptive\ Automation/Scripts/test.sh']),
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 172, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

>>> subprocess.call(['/Library/Application Support/Perceptive Automation/Scripts/test.sh']),
Hello World
(0,)
>>>

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests