-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Description
I'm trying to authenticate via a service account and having issues with googlesheets4.
Authentication is working for drive but when I attempt to pull down anything via sheets I get an error listed below.
library(googledrive)
library(googlesheets4)
drive_auth(
path = gargle::secret_decrypt_json(
system.file("secret", "secret.json", package = "mypackage"),
"SERVICE_KEY"
),
subject = "[email protected]"
)
gs4_auth(token = drive_token())
ss <- drive_example_remote("chicken.csv")
drive_get(as_id(ss))
# # A dribble: 1 × 3
# name id drive_resource
# <chr> <drv_id> <list>
# 1 chicken.csv 1VOh6wWbRfuQLxbLg87o58vxJt95SIiZ7 <named list [38]>
# >
gs4_get(as_id(ss))
# Error:
# ! Failed to evaluate glue component {type}
# Caused by error:
# ! object 'type' not found
# Run `rlang::last_trace()` to see where the error occurred.
rlang::last_trace(drop = FALSE)
# <error/rlang_error>
# Error:
# ! Failed to evaluate glue component {type}
# Caused by error:
# ! object 'type' not found
# ---
# Backtrace:
# ▆
# 1. ├─googlesheets4::gs4_get(as_id(ss))
# 2. │ └─googlesheets4:::gs4_get_impl_(as_sheets_id(ss))
# 3. │ └─gargle::response_process(raw_resp)
# 4. │ ├─gargle:::gargle_abort_request_failed(...)
# 5. │ │ └─gargle:::gargle_abort(...)
# 6. │ │ └─cli::cli_abort(...)
# 7. │ │ └─cli:::vcapply(message, format_inline, .envir = .envir)
# 8. │ │ └─base::vapply(X, FUN, FUN.VALUE = character(1), ..., USE.NAMES = USE.NAMES)
# 9. │ └─gargle (local) error_message(resp, call = call)
# 10. │ └─gargle:::reveal_details(error$details)
# 11. │ ├─base::unlist(lapply(details, reveal_detail))
# 12. │ └─base::lapply(details, reveal_detail)
# 13. │ └─gargle (local) FUN(X[[i]], ...)
# 14. │ ├─gargle::bulletize(...)
# 15. │ └─gargle:::map_chr(...)
# 16. │ └─gargle:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
# 17. │ └─base::vapply(.x, .f, .mold, ..., USE.NAMES = FALSE)
# 18. │ └─glue (local) FUN(X[[i]], ...)
# 19. │ └─glue::glue_data(...)
# 20. ├─glue (local) `<fn>`("type")
# 21. │ ├─.transformer(expr, env) %||% .null
# 22. │ └─glue (local) .transformer(expr, env)
# 23. │ ├─glue:::with_glue_error(...)
# 24. │ │ └─base::withCallingHandlers(...)
# 25. │ └─base::eval(expr, envir)
# 26. │ └─base::eval(expr, envir)
# 27. └─base::.handleSimpleError(...)
# 28. └─glue (local) h(simpleError(msg, call))
# 29. └─rlang::abort(message, parent = cnd, call = NULL)
Metadata
Metadata
Assignees
Labels
No labels