2

I am trying to use the C# pythonplotter package, but when I compile the example from github an error message shows up:

Error in spawning plotting process: The specified executable is not a valid application for this OS platform.

I am not sure what OS I need to use.

I currently use 64-bit Windows 10

Mad Physicist
  • 107,652
  • 25
  • 181
  • 264
Raul Salazar
  • 19
  • 1
  • 4
  • The [RunPythonScript](https://github.com/IRC-SPHERE/PythonPlotter/blob/master/Utils.cs) method is `Process.Start()`ing the .py file itself. Windows can't do that (see [here](http://stackoverflow.com/questions/7002995/execute-os-command-on-a-file-c-sharp)), unless you change `UseShellExecute` to `true`, then `Process` asks Explorer, "Open this .py file with whatever the default program is". But you can't use `UseShellExecute=true` when redirecting stdout like they do. So you could try setting the startinfo to start Python itself and pass it arguments such that it runs the .py file. *shrug* – Quantic Jun 10 '16 at 19:12
  • P.s., the main point is that the author has written and tested the program on linux: "Currently tested only on *nix platforms", which is why you are running into issues on Windows. – Quantic Jun 10 '16 at 19:17
  • oh ok guys, thanks for the answer, I desisted , but its good to know that now :) – Raul Salazar Jun 23 '16 at 19:25

1 Answers1

1

I am the author of that package. As mentioned in the comments, I've only tested this on linux and OS-X. I did plan to adapt it for Windows at some point. Please feel free to submit a pull request!

tdc
  • 8,219
  • 11
  • 41
  • 63