@@ -4,6 +4,11 @@ ee_create_credentials_drive <- function(user=NULL, ee_utils, quiet) {
4
4
# check googledrive R package installation
5
5
ee_check_packages(" ee_Initialize" , " googledrive" )
6
6
7
+ # Check sanity of earth-engine and return ee_utils.py module
8
+ init <- ee_check_init()
9
+ ee_utils <- init $ ee_utils
10
+
11
+
7
12
# setting drive folder
8
13
if (is.null(user )) {
9
14
ee_path <- ee_utils_py_to_r(ee_utils $ ee_path())
@@ -83,6 +88,10 @@ ee_create_credentials_gcs_ <- function(user, ee_utils) {
83
88
# check packages
84
89
ee_check_packages(" ee_Initialize" , " googleCloudStorageR" )
85
90
91
+ # Check sanity of earth-engine and return ee_utils.py module
92
+ init <- ee_check_init()
93
+ ee_utils <- init $ ee_utils
94
+
86
95
# setting gcs folder
87
96
if (is.null(user )) {
88
97
ee_path <- suppressWarnings(ee_utils_py_to_r(ee_utils $ ee_path()))
@@ -99,8 +108,10 @@ ee_create_credentials_gcs_ <- function(user, ee_utils) {
99
108
if (! any(gcs_condition )) {
100
109
gcs_text <- paste(
101
110
sprintf(" Unable to find a service account key (SAK) file in: %s" , crayon :: bold(ee_path_user )),
102
- " Please, download and validate it using rgee::ee_utils_sak_validate." ,
103
- " Then, use rgee::ee_utils_sak_copy to set the Service Account Key." ,
111
+ " To solve this problem:" ,
112
+ " 1) download it from your Google cloud console" ,
113
+ " 2) validate it using rgee::ee_utils_sak_validate [OPTIONAL]." ,
114
+ " 3) Use rgee::ee_utils_sak_copy to set the SaK in rgee." ,
104
115
" A tutorial to obtain the SAK file is available at:" ,
105
116
" > https://r-spatial.github.io/rgee/articles/rgee05.html" ,
106
117
crayon :: bold(" As long as you haven't saved a SKA file, the following functions will not work:" ),
0 commit comments