Closed nick-youngblut closed 11 months ago
It's basically impossible to do much better than this, because path
is actually passed through to jsonlite::fromJSON()
and, yeah, it's often a filepath, but is could be "a JSON string, URL or file". See the docs for gs4_auth()
:
https://googlesheets4.tidyverse.org/reference/gs4_auth.html#arguments
gargle (and therefore packages like googlesheets4) actually use this functionality, i.e. the possibility of providing a JSON string. So, I can tell if the attempt to use path
failed, but I can't tell if the user meant to provide a filepath or a JSON string.
I'm sort of assuming/hoping that the fact you saw this message at all did help you diagnose and fix your problem. In the past, we didn't even have this!
Upon further though, maybe I can improve on this message. I'll open an issue about it in gargle (which is where the error comes from).
Command:
Output:
It would help to have a check for whether the json file exists, and if not, provide an error stating that the provided path is incorrect.
sessionInfo