0

I'm trying to run Task1.py via Shiny framework of R in Task1.r. Python code is successfully running. But it is giving me error in some line.

Task1.py:

   ...
    ... 
   params.override(...) //This line is running fine and giving desired output
   params.process()  //This line is giving error that file doesn't exists
    ...
   ...

Task1.r:

observeEvent(input$action_retrain_1,{
...
 ...                
py_run_file("D:/..../Task1.py")
 ...
...
  })

Previously asked question that I'm following to resolve error:

How to open CSV file in R when R says "no such file or directory"?

Effort to resolve error:

I used following two lines before py_run_file(), but it is still giving me same error. What should I do? What am I missing?

setwd('D:/PycharmProjects/.../sample')
myfile = read.csv('D:/PycharmProjects/.../sample/parameters.yaml')

Error:

Warning: Error in py_run_file_impl: SystemExit: [Errno 2] No such file or directory: 'D:/PycharmProjects/.../sample/parameters.yaml'
  76: <Anonymous>

parameters.yaml file exists in folder named sample, but I don't know why it is giving me error. I'm running this in Pycharm, there it works well. But it is giving me problem in R. Anyone know how can I resolve this issue?

Knowledge Seeker
  • 526
  • 7
  • 25

0 Answers0