-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reticulate python code fails in Rstudio but nor R terminal? #1691
Comments
This is a new error with Python 3.13. You can work around it for now by downgrading Python to 3.12, or installing the development version of reticulate, where this is fixed. Also, the ssl issues is unrelated, but can probably be easily resolved by not using conda and switching to |
thanks a lot for the fast reply! Using a conda environment with python 3.12 indeed solved the issue in Rstudio. I'm still puzzled that it worked even with python 3.13 in the terminal but not in rstudio. Does that make sense to you, knowing that's the same environment? Thanks! |
It's because the IDE is evaluating additional code in the background, e.g., probing objects to populate the Variables Pane or generate autocompletions, and those background R calls are causing the Python C internals to emit the warnings. |
excellent, thanks for the additional explanation, much appreciated |
I am using reticulate to access the google earthengine API calling
reticulate::py_run_string("import ee; ee.Authenticate()")
. (doing this with reticulate as I am facing issue with rgee) Curiously enough, the command runs fine when launched in the R terminal, but not from Rstudio.Any idea of what could be causing this?
The command is (see below for details on
ee
):I get the error message when running from Rstudio:
This is quite troubling as indeed, my openssl cversion on this Ubuntu 24.04 machine is 3.0.13, but not sure why the problem does not happen when launchign the same command from a plain R terminal?
And
reticulate::py_last_error()
gives:── R Traceback ──────────────────────────────────────────────────────────────────────────────────────────────────
▆
See
reticulate::py_last_error()$r_trace$full_call
for more details.where ee is created as:
The text was updated successfully, but these errors were encountered: