3

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?

Viðar Ingason
  • 265
  • 3
  • 11

2 Answers2

2

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""
Lefteris S
  • 1,614
  • 1
  • 7
  • 14
  • Thank you for your answer. My problem is that I'm working with the cloudml package in R and I don't know how much control I have. I.e. I'm just using a function and I don't know how I can add quotation marks around the path. Any idea? – Viðar Ingason May 14 '18 at 15:28
  • Can you provide some more details on what you do? Do you follow the steps [here](https://tensorflow.rstudio.com/tools/cloudml/articles/getting_started.html)? – Lefteris S May 20 '18 at 11:57
  • Yes I followed these steps. I tried this on my PC at work and my laptop at home and I get the same error on both of the computers. I'm using Windows 10. – Viðar Ingason May 22 '18 at 10:45
  • @ViðarIngason did you manage to get a fix? I have the exact same issue – Shinobi_Atobe Apr 08 '19 at 11:05
  • @Shinobi_Atobe no I didn't. I think I ended up using a macbook. – Viðar Ingason Apr 08 '19 at 15:25
  • I solved it last night by re-running `cloudml::gcloud_init()` – Shinobi_Atobe Apr 09 '19 at 08:25
0

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
Tokci
  • 1,220
  • 1
  • 23
  • 31