System.callSystem bug?

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
vidjuheffex
Posts: 18
Joined: May 6th, 2012, 2:11 pm

Code: Select all

        var pythonPath = scriptAssetFolder.fsName + '\\jive_getProjects.pyw';
        var JSONPath = prefsPath + '\\getProjects.json';
        var concatString = 'start /MIN python '+  '"' + pythonPath + '" "' + JSONPath+ '"';
        var external = system.callSystem("cmd.exe /c \"" + concatString + "\"");
This code works at home. When I brought in my script to the office to continue working I get a crash.

To clarify, if I remove "start". The script "works" that is, it executes the python script, WAITS for the script to complete, then returns focus to my AE GUI. Not what I want. If I use start, it opens a new instance of Python (freeing up the callSystem code) and then goes into a window update loop until the file the python script is generating/writing is complete. (in other words, really primitive async for a dropdown with Shotgun data)

Again, this ONLY works at home and flawlessly at that. If I add the start command to the concatString when at work, the script execution hangs on that line. The json file that the python script generates gets added to the filesystem so I know it is executing the command fine, its like it never returns anything to inform it that it's job is done. (it's job being merely to run the pyw file, not wait on its results)

The only difference system-wise is that my work PC is Win 7 64-bit and at home I am running 8.1 RTM. Otherwise, they are both copies of AE CS6.


I am pulling my hair out over this! (as it has been the only satisfactory approach, writing a bat and executing the bat was OK, but opened extendscript tookit each time regardless of javascript debugging status, as well as having the command prompt flash to the front of the screen)
vidjuheffex
Posts: 18
Joined: May 6th, 2012, 2:11 pm

I should add, it doesn't work on any machine at work
Post Reply