I have a python program which in turn calls an R script for doing some calculations. This worked great till I switched over to UNC. I am on Windows and I tried all that has been suggested on StackOverflow but I still keep getting an error saying "base package can't be opened"
I have tried with backward slashes meaning on the lines of \\server/abc/a.exe etc as well as \\server\abc\a.exe
What am I missing? It seems the problem is that the executable can't have a UNC path , in this case the variable rscriptpath. I really need that to be a UNC as the caller program would not in the same server. Thanks in advance.
import subprocess
Date='2018-03-01'
env='PROD'
main_dir=r'\\sandbox0968\QRMPortfolioRisk\QRMPortfolioRisk'
rscriptpath = r'\\sandbox0968\bin\Rscript.exe'
dailymain = r'\\sandbox0968\QRMPortfolioRisk\QRMPortfolioRisk\src\daily\DailyMain_cmd.R'
dailymainstatic = r'\\sandbox0968\QRMPortfolioRisk\QRMPortfolioRisk\src\daily\DailyMainStatic.R'
cxo_script = r'\\sandbox0968\QRMPortfolioRisk\QRMPortfolioRisk\src\daily\CXOdump.R'
calc_dir = r'\\sandbox0968\QRMPortfolioRisk\QRMPortfolioRisk\data\calculations'
reestimate = r'\\sandbox0968\QRMPortfolioRisk\QRMPortfolioRisk\src\estimation\EstimationMain_cmd.R'
#
subprocess.check_call([rscriptpath, '--vanilla', dailymain, str(Date), str(main_dir), env])