raganmd / blog-td-subprocess Goto Github PK
View Code? Open in Web Editor NEWWorking with Subprocess and TouchDesigner
License: MIT License
Working with Subprocess and TouchDesigner
License: MIT License
Hello, how is it going?
I am trying to run a python3 from script within touch designer 2019.19.160 on a mac osx 10.13.6 using the subprocces. It has args so what I have so far is
def LookForGenderAndAge():
# point to our script that we're going to execute
cmd_python_script = '{}/scripts/AgeGender.py'.format(project.folder)
# cmd_python_script = '{}/Users/mraeclo/Documents/GitHub/learnopencv/AgeGender/AgeGender.py'.format(project.folder)
# construct a list of arguments for out external script
currentFuckface = str(op('currentFuckface').par.value0)
pathToImage = '/Users/mraeclo/Documents/Touch Designer/RacistPurikura/Fuckfaces_capture/'
script_args = ['--input', pathToImage + "fuckface" +
currentFuckface + ".png", '--fuckface', currentFuckface]
# set python3 to be used instead of python
python_exe = '/Library/Frameworks/Python.framework/Versions/3.5/Resources/Python.app'
# join our python instructions with our scirpt args
command_list = [python_exe, cmd_python_script] + script_args
# command_list = ['python', cmd_python_script] + script_args
# call our script with subprocess
subprocess.Popen(command_list, shell=False)
print("finished calling script")
Which gives me the following errors
Traceback (most recent call last):
File "/project1/script_extractFeatures", line 8, in onValueChange
File "/project1/script_extractFeatures", line 32, in LookForGenderAndAge
File "/Applications/TouchDesigner099.app/Contents/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/Applications/TouchDesigner099.app/Contents/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 1541, in _execute_child
raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied
I tried other paths but they give the same error as the above
Am I pointing to the wrong place?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.