RStudio fails to open an extant Rmd file if Sys.setenv is set in the Rprofile.site file

I use RStudio 2024.12.0 Build 467, R version 4.4.2 Patched (2024-12-02 r87418 ucrt) under Wildows 10 Pro.
As I also use Python, I inserted the following line in my Rprofile.site file:
Sys.setenv(RETICULATE_PYTHON = "C:/Python/Python310/python.exe") which points at ms python installation.

After I did this, clicking on an extant RMd file started R studio, bur did not load the Rmd file. When I commented the "Sys.setenv ..." out, opening of RMd files worked fine again.

I have another machine running the previous version of Rstudio (and R4.1.1) and I never had this problem. I also tried a complete new installation of RStudio after inserting the Sys.setenv... line - to no avail.

I would be gratful for any advice.

Best

KS

Hi @KGSchilling
Welcome to the Posit/RStudio Community Forum.

I can't specifically answer your question but perhaps using the R {startup} package my help track down what is going on. Also, the {startup} documentation is very helpful in understanding the overall process.
See: https://henrikbengtsson.github.io/startup/

There are some known bugs with files not opening in RStudio 2024.12.0 when you launch the application by double-clicking a file. See Double-clicking an R script to open it in RStudio opens RStudio but not the script · Issue #15536 · rstudio/rstudio · GitHub for details.

This should be fixed in the upcoming patch release (2024.12.1). If you want to try a daily build and see if it solves it for you, download the most recent from: Kousa Dogwood.

@ GaryR: I jsut followed your advise and installed RStudio-2024.12.1-549. This solved the problem.

Thank you so much, Karl

@DavoWW : Thank you for your help. I will proceed as you suggested, even if my acute problem was due to a bug in RStudio. But your proposed procedure seems a useful strategy should similar issues come up in the future.

Thank you so much, Karl