Open Wang-yongxiang opened 2 years ago
This is the problem of VPN proxy. I found two solutions for RStudio
and VScode
respectively.
The following solution not working. Because we need to set proxy before R start, other than after. See https://github.com/r-spatial/rgee/issues/73#issuecomment-1186549194 for details.
Sys.setenv(https_proxy="http://127.0.0.1:1081")
Sys.setenv(http_proxy="http://127.0.0.1:1081")
R.exe
#subl C:/Program Files/R/R-4.2.0/etc/Rcmd_environ
http_proxy="http://127.0.0.1:1081"
https_proxy="http://127.0.0.1:1081"
radian.exe
// code .vscode/settings.json
{
"r.rterm.windows": "c:/ProgramData/Miniconda3/envs/gee/Scripts/radian.exe",
"terminal.integrated.env.windows": {
// "PATH": "${env:PATH}",
"http_proxy":"http://127.0.0.1:1081",
"https_proxy":"http://127.0.0.1:1081",
},
}
At submit an issue, please attached the following information of your
rgee
session:[Yes ] You have the Python API installed (from terminal):
[No ] You can find the credentials file on your system:
[ No] You can run a simple EE command from R:
Attach your Python (reticulate) configuration:
python: C:/Users/Spirit_W/AppData/Local/r-miniconda/envs/rgee/python.exe libpython: C:/Users/Spirit_W/AppData/Local/r-miniconda/envs/rgee/python38.dll pythonhome: C:/Users/Spirit_W/AppData/Local/r-miniconda/envs/rgee version: 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 05:59:00) [MSC v.1929 64 bit (AMD64)] Architecture: 64bit numpy: C:/Users/Spirit_W/AppData/Local/r-miniconda/envs/rgee/Lib/site-packages/numpy numpy_version: 1.23.1 ee: C:\Users\Spirit_W\AppData\Local\R-MINI~1\envs\rgee\lib\site-packages\ee__init__.p
NOTE: Python version was forced by RETICULATE_PYTHON
Description
ee_Initialize is failing,The previous stage of the installation process was successfully completed,When I execute the ee_Initialize() command, the browser can pop up and open the gcloud CLI authentication,until the page says "You are now authenticated to the gcloud CLI!"and console text display:“Credentials saved to file: [C:\Users\Spirit_W\AppData\Roaming\gcloud\application_default_credentials.json]”、“These credentials will be used by any library that requests Application Default Credentials (ADC).”,Then after waiting for a while, the console shows:“Fetching credentials using gcloud”and“Successfully saved authorization token.”and“Error in py_call_impl(callable, dots$args, dots$keywords) : socket.timeout: timed out”
What I Did
Credentials saved to file: [C:\Users\Spirit_W\AppData\Roaming\gcloud\application_default_credentials.json]
These credentials will be used by any library that requests Application Default Credentials (ADC). Fetching credentials using gcloud
Successfully saved authorization token. Error in py_call_impl(callable, dots$args, dots$keywords) : socket.timeout: timed out