Closed gsaabogado closed 1 year ago
Do you have anaconda installed in addition to the miniconda used by rgee? I had a similar issue that was solved by exiting out of conda base
by running (in bash/zsh) $ conda deactivate
and then installing gcloud via brew install --cask google-cloud-sdk
Although gcloud was installed in my terminal in both the base and an 'ee' named virtual env via anaconda, it wasn't in my bare terminal which is likely what library(reticulate)
is using when it runs various commands via base::system()
in your terminal to init and authenticate ee.
see #273 for context
I think this has been solved in the latest version. Please open a new issue if you still need help. ee_Initialize(auth_quiet = TRUE, auth_mode = "gcloud"), check auth_mod documentation
At submit an issue, please attached the following information of your
rgee
session:[Yes ] You have the Python API installed (from terminal):
[ Yes] 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: /users_home/seme/ls01122/.local/share/r-miniconda/envs/r-reticulate/bin/python libpython: /users_home/seme/ls01122/.local/share/r-miniconda/envs/r-reticulate/lib/libpython3.8.so pythonhome: /users_home/seme/ls01122/.local/share/r-miniconda/envs/r-reticulate:/users_home/seme/ls01122/.local/share/r-miniconda/envs/r-reticulate version: 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:18) [GCC 10.3.0] numpy: /users_home/seme/ls01122/.local/share/r-miniconda/envs/r-reticulate/lib/python3.8/site-packages/numpy numpy_version: 1.23.1
Description
Describe what you were trying to get done. I am trying to run the ee_Initialize function for the first time Tell us what happened, what went wrong, and what you expected to happen. The function seems to work properly. However, the link it produces is invalid for google -- i.e., error 400 (Authorization error)
What I Did
The command is
ee_Initialize()
The output is:
✔ user: not_defined ✔ Initializing Google Earth Engine:Fetching credentials using gcloud Go to the following link in your browser:
Enter authorization code:
After selecting the link, I get the error 400 -- I attach the web-page with the error