datadrivencv
datadrivencv copied to clipboard
Failure to knit CV
Hi Nick,
Lovely package you got. I tried using it and followed the step you enumerated in your website. But when i tried to knit the html or pdf version I get this sort of error message
Error: Client error: (403) PERMISSION_DENIED
* Client does not have sufficient permission. This can happen because the OAuth token does not have the right scopes, the client doesn't have permission, or the API has not been enabled for the client project.
* The caller does not have permission
Any idea how to navigate this one. Stan
Ah. It looks like you need to run a google sheets call outside of the knit first.
Try running googlesheets4::read_sheet(data_location, sheet = "language_skills", skip = 1)
in the console once. That should set up the proper permissions etc.
Also, to make sure, did you set the sheet sharing to be "public" (or "anyone can read")? This isn't strictly necessary but makes authentication easier.
I have exactly the same error @stanleesocca On the other hand when I try @nstrayer : googlesheets4 :: read_sheet ("https://docs.google.com/spreadsheets/d/1zraEpmrTpUBSpP-nZewv4FMGRebDVVndyFq9T1DPQW0/", sheet = "language_skills", skip = 1) It generates an error: "Error: Client error: (403) PERMISSION_DENIED * Client does not have sufficient permission. This can happen because the OAuth token does not have the right scope ... " I don't understand how I can modify for sheet sharing to be "public". It should be noted that when I try with its excel, it runs perfectly.
@biologisturiel if you want to keep your sheet private you can use the method as described in this link https://josiahparry.com/post/2020-01-13-gs4-auth/. You just need to change up the functions names that have changed in the new version of googlesheets4
Hello, I'm still stuck. I have tried several ways, however the only way is using the excel link from @nstrayer
@biologisturiel did you manage to switch your sheet to public? https://support.google.com/docs/answer/183965?co=GENIE.Platform%3DDesktop&hl=en#
@nstrayer @mannymistry I've tried making my sheet public, and authenticating gs4 seemed to work, but I'm still getting the same error:
Error: Client error: (403) PERMISSION_DENIED * Client does not have sufficient permission. This can happen because the OAuth token does not have the right scopes, the client doesn't have permission, or the API has not been enabled for the client project. * The caller does not have permission
Hi guys this is how I got around it. Context - I am using a private sheet. Make sure you are using the most updated version of googlesheets4. First I added my api key to the project specific cache .secrets.
designate project-specific cache
options(gargle_oauth_cache = ".secrets")
check the value of the option, if you like
gargle::gargle_oauth_cache()
trigger auth on purpose --> store a token in the specified cache a browser will be opened
googlesheets4::gs4_auth()
after I did this I manually adjusted the create_CV_object I changed the default sheet_is_publicly_readable = FALSE as well after the else I removed what was there and added googlesheets4::gs4_auth( cache = ".secrets", email = "[email protected]" )
Hi all,
I've just run into the same issue. Did the googlesheets call above but got the error again. So I made the sheet 'public' by clicking 'Share', then under 'get link' I changed the permissions to 'anyone with the link' which worked just fine.
Hello again! Finally I found a solution thanks to @will-ball , I followed the indicated:
- Make a copy of "https://docs.google.com/spreadsheets/d/14MQICF2F8-vf8CKPF1m4lyGKO6_thG-4aSwat1e2TWc/edit" (File -> Make a copy)
- Click on Share
- In the option get link, click on "change", below "copy link", point to "editor".
- Finally, copy link. PD: Keep in mind to modify little by little, since when I made a big modification, I got:
"Result 5 must be a single string"...
Thanks everyone for your help, it's a great package!