3
votes

I just installed the google cloud package on R (cloudml). When I submit a job to the cloud I get this error message:

Error: ERROR: gcloud invocation failed [exit status 1]

[command]

cmd /c C:\Users\vidar\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\gsutil.cmd ls -p

[output]

[errmsg] 'C:\Users\vidar\AppData\Local\Google\Cloud' is not recognized as an internal or external command, operable program or batch file.

Installing the cloudml package in R took care of installing Google SDK and I didn't get any error message or anything during the installation process.

Any idea why I get this error message?

2

2 Answers

2
votes

You are getting an error in this command:

cmd /c C:\Users\vidar\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\gsutil.cmd ls -p

because it includes a space in the path (in Cloud SDK). From this answer in an older question:

You have to add quotation marks around each path and also enclose the whole command in quotation marks

In your case:

cmd /c ""C:\Users\vidar\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\gsutil.cmd" "ls -p""
0
votes

Please run following command to resolve the error

 gcloud_init()

refer to article for details

rstudio with cloudml on GCP

Packages should be installed in following manner

install.packages("cloudml")
library(cloudml)
gcloud_install() # install the SDK using the 
gcloud_init() #  default account, project, or region you can use the gcloud_init() function