Problem running command line from within Maya2017
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hopefully this makes sense. I'm in running Maya2017 and I do have Maya2016 install as well. I need to run a python script through command line with one argument to process files.
The string that I construct is as follow: {pythonexe_path} {script_path} {filepath}
Running that string manually through command line and the results are as I expected it to be. The issue is when I try to run it from a custom tool UI within Maya2017.
The line I use is as follow: subprocess.Popen( ({pythonexe_path} {script_path} {filepath}) , shell=True)
When I run the tool, I get no errors and everything execute except the line mention above. After some trouble shooting, I have isolated the issue to the {pythonexe_dir} that I'd declared, it points to Maya 2016's mayapy.exe not Maya2017's mayapy.exe. I tested it by changing the script and the {mayapyexe_path} to Maya2017's and it executes.
Why I'm I using Maya2016->mayapy.exe? There are some legacy dependencies from 2016 that is still needed.
Does anyone know the reason for this? Is there work around for this? Or am I going at this the wrong way?
Thanks in advance.