MarkEdmondson1234 / googleCloudRunner

Easy R scripts on Google Cloud Platform via Cloud Run, Cloud Build and Cloud Scheduler
https://code.markedmondson.me/googleCloudRunner/
Other
81 stars 26 forks source link

Problem with cr_setup() - Error in if (file.exists(local_file)) { : argument is of length zero #120

Closed Camilonfc closed 2 years ago

Camilonfc commented 3 years ago

Hello Mark, I hope you are well. I write since I am having problems trying to configure the package (googleCloudRun), I was following the configuration video, but from the beginning I have problems. I tried downloading the package from CRAN and your dev version, and I have the same problem, it happens that once the package is installed and I execute the statement library (googleCloudRun)> cr_setup () the configuration menu opens, but when pressing any of The options gives me the following error: (Error in if (file.exists (local_file)) {: argument is of length zero), probe uninstalling, restarting RStudio, reinstalling, but the problem continues, I am working with R version 4.1 .0 (2021-05-18). I would appreciate your help to see what may be happening, since I need to automate my R scripts in GCP. Greetings! console log.txt

MarkEdmondson1234 commented 3 years ago

Could you also run sessionInfo() to show your system? I'm guessing its not finding an .Renviron file in your home directory. You could try creating that. Its a bug though that it fails if it doesn't exist if that is the case.

Camilonfc commented 3 years ago

Thanks for your answer, I just checked, leave my information attached, anyway in the work path if I have created a .Renviron file (this was created by watching the video), I don't know if I should leave it in another path or it should go in the project work path. sessInfo.txt

Camilonfc commented 3 years ago

I think I found the problem, the .Renviron file in my Home directory was empty, I copied the information from the .Renviron file of my project and it worked, but with another error, but I think it is due to configuration issues.

library (googleCloudRunner) v Setting scopes to https://www.googleapis.com/auth/cloud-platform x Failed! Auto-authentication via GCE_AUTH_FILE = C: \xxxxxxxxxxxxxxxx\ GCP Test \ googlecloudrunner-client.json - error was: $ private_key not found in JSON - have you downloaded the correct JSON file? (Service Account Keys, not service account client)

I will continue with the video, maybe I missed setting a parameter or I made a mistake in something. Thanks again

MarkEdmondson1234 commented 2 years ago

Turns it it is an issue with googleAuthR if you don't have an active RStudio project.

MarkEdmondson1234 commented 2 years ago

Should now be fixed if you use dev version of googleAuthR