How can I log or pass error messages from python back to R?

Recently, I had a very high level question about reticulate. It feels like there are alot of good tutorials out there about how objects are passed from reticulate R to python and from python to reticulate R.

One thing that is confusing me still is how can I handle error messages for when I want to deploy (put in production) my reticulate /python code ?

https://rstudio.github.io/reticulate/articles/python_primer.html#import-and-modules
https://rstudio.github.io/reticulate/index.html

Suppose I have the following python function.

def my_func(a):
       try:
               print(x)
       except:
               print("An exception occurred")

How can I use reticulate so that R will log the error when I call Rscript.exe or R.exe (or the linux equivalents in .sh files) ?

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.