hkaramian / RobustVideoMatting-For-Nuke

Robust Video Matting For Nuke
http://hkaramian.com
GNU General Public License v3.0
41 stars 1 forks source link

'Command Not Recognized' Error in run_rvm_core Function due to Space in Path #3

Open NicoErba opened 7 months ago

NicoErba commented 7 months ago

When invoking the run_rvm_core function to execute the Run.cmd script, I encounter an error due to the way Windows handles file paths with spaces. The specific error message is:

'C:/Program' n’est pas reconnu en tant que commande interne ou externe, un programme exécutable ou un fichier de commandes.

I modified the run_rvm_core function to adress this problem :

def run_rvm_core(): global processIsDone run_cmd = Plugin_Path + "/RVM_Core/Run.cmd" commands = u'/k ""' + run_cmd + '""' ctypes.windll.shell32.ShellExecuteW( None, u"", u"cmd.exe", commands, None, 1
)

Now, everything is functioning correctly. However, I'm not entirely sure why these adjustments were necessary. When I directly executed Run.cmd from the RVM_Core directory, it worked fine. But invoking it from the node inside Nuke triggered the error mentioned earlier.