I am trying to a run a Python file via command line or within the interpreter using:
import sys
import subprocess
subprocess.call([sys.executable, "file.py", "arg1", "arg2", "arg3"])
However the program returns a TypeError: "cannot concatenante 'str' and 'numpy.float64' objects".
What I can not understand, is when I run the program line by line in the interpreter, there are no such errors and everything is fine.
I have no idea as to where to start debugging this but I suspect it could have something to do with my setup.
I have a 64bit version of Python and 32bit version of Python installed in Windows 7. Both versions of Python are 2.7. (This is due to usage of some modules which are only available in 32 bits - as such the program above is being running in the 32 bit version). The Environment Path variable has been edited to only use the 32bit version.
I'm not sure what other information is relevant but please let me know and I'll dig it up.
Basically I just want to be able to run the program from command:
python program.py arg1 arg2 arg3
Any help is greatly appreciated
python file.py arg1 arg2 arg3?