I have a script that runs perfectly in python from the command line or using shell in R, but not when trying to use source_python
or py_run_file
in R.
The scripts reads a csv file, uses pulp to do some optimization and writes the result as a csv file.
Session Info
R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
I think the problem is with pulp or Windows, I get the following error:
Error in py_run_file_impl(file, local, convert) :
OSError: [WinError 6] Controlador no válido
Detailed traceback:
File "", line 87, in
File "C:\PROGRA3\ANACON1\lib\site-packages\pulp\pulp.py", line 1664, in solve
status = solver.actualSolve(self, **kwargs)
File "C:\PROGRA3\ANACON1\lib\site-packages\pulp\solvers.py", line 1362, in actualSolve
return self.solve_CBC(lp, **kwargs)
File "C:\PROGRA3\ANACON1\lib\site-packages\pulp\solvers.py", line 1420, in solve_CBC
stderr = pipe)
File "C:\PROGRA3\ANACON1\lib\subprocess.py", line 667, in init
errread, errwrite) = self._get_handles(stdin, stdout, stderr)
File "C:\PROGRA3\ANACON1\lib\subprocess.py", line 890, in _get_handles
p2cread = _winapi.GetStdHandle(_winapi.STD_INPUT_HANDLE)