r-spatial / rgee

Google Earth Engine for R
https://r-spatial.github.io/rgee/
Other
668 stars 146 forks source link

ee_Initialize() issue about gcloud failed #325

Open Daifei-Huang opened 1 year ago

Daifei-Huang commented 1 year ago

My input **

library(rgee) ee_check()

Sys.setenv(http_proxy='http://....') Sys.setenv(https_proxy='http://....')

Sys.getenv("RETICULATE_PYTHON") Sys.setenv("EARTHENGINE_GCLOUD" = "D:/Miniconda3/envs/gee/google-cloud-cli-424.0.0-windows-x86_64/google-cloud-sdk/bin/") system("gcloud --version")

ee_Initialize(drive = T)

Then I get those output **

ee_check() ◉ Python version ✔ [Ok] D:/Miniconda3/envs/gee/python.exe v3.9 ◉ Python packages: ✔ [Ok] numpy ✔ [Ok] earthengine-api Sys.getenv("RETICULATE_PYTHON") [1] "D:/Miniconda3/envs/gee/python.exe" system("gcloud --version") Google Cloud SDK 424.0.0 bq 2.0.89 core 2023.03.24 gcloud-crc32c 1.0.0 gsutil 5.21 [1] 0 ee_Initialize(drive = T) ── rgee 1.1.5 ──────────────────────────────────────────────────────────────── earthengine-api 0.1.345 ── ✔ user: not_defined ✔ Google Drive credentials: FOUND ✔ Initializing Google Earth Engine:Fetching credentials using gcloud Error: Exception: gcloud failed. Please check for any errors above. *Possible fixes: If you loaded a page with a "redirect_uri_mismatch" error, run earthengine authenticate with the --quiet flag; if the error page says "invalid_request", be sure to run the entire gcloud auth command that is shown. More information: https://developers.google.com/earth-engine/guides/python_install

I tried to run "import ee; ee.Initialize()" in the python IDE and got no error or warning. How can I deal with this issue?