Search code examples
pythonvisual-studio-codecall

'solvergraphics.pyde' is not recognized as an internal or external command, operable program or batch file


I am trying to call a processing file from my code and it works for one file called Graphics.pyde but not another called solvergraphics.pyde. I am really confused at why. They are both formatted the same, and I have added them both to the VS code workspace (not sure if this helps). The main code from which I am calling the two files is in a folder containing 2 files one for each of the codes. Any help much appreciated. The code to call the other code is below

subprocess.call("solvergraphics.pyde", shell = True)

Solution

  • This involves the path of the workspace. When you run the file, CMD is located in the current workspace. If you do not put the .pyde files under the workspace, it may not recognize it.

    This can works for me:

    enter image description here

    enter image description here

    enter image description here

    Please ensure that the folder where CMD is located contains the .pyde file.