Closed Kdreval closed 1 year ago
I was not able to reproduce this error, based on the suggested cause for these cryptic errors. The error message that gets returned when setting the working directory outside of the package repo where the config lives, seems to give a reasonable error message:
setwd("../../")
get_gambl_metadata()
Error in config::get("repo_base") :
Config file config.yml not found in current working directory or parent directories
The error up top does look familiar, but I am not sure what to do with this until we can pinpoint the origin of this error. Do you have a fully reproducible example of how this error gets returned?
I just ran into this error and the issue was an outdated config that was missing the newer template values. I think it's not missing config, but that functions that look for template values don't throw an error message when the expected template is missing, which means that they try to glue wildcards into the repo_base instead of the full assembled template file path.
I think we need some kind of check to ensure that the template value is not NULL to handle this.
Currently we would get some cryptic errors similar to:
or
and I think it is related to missing config when setwd is not set or not set properly. It will be helpful if this is checked globally and returns a useful error when config is missing.