Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error message for Error knitting README.Rmd #117

Open
stefaniebutland opened this issue Sep 30, 2024 · 5 comments
Open

Better error message for Error knitting README.Rmd #117

stefaniebutland opened this issue Sep 30, 2024 · 5 comments
Assignees

Comments

@stefaniebutland
Copy link
Member

@seankross I got the following error msg when I tried to knit README.Rmd after create_readme. I'm stumped. Any help appreciated.

Error msg

  |.....................                               |  40% [setup]          

processing file: README.Rmd
                                                                                                            
Error in `!continue`:
! invalid argument type
Backtrace:
  1. rmarkdown::render("/Users/stefaniebutland/README.Rmd", encoding = "UTF-8")
  2. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
  3. knitr:::process_file(text, output)
  6. knitr:::process_group(group)
  7. knitr:::call_block(x)
  8. knitr:::block_exec(params)
  9. knitr:::eng_r(options)
 12. knitr (local) evaluate(...)
 13. evaluate::evaluate(...)

Quitting from lines 9-11 [setup] (README.Rmd)
Execution halted

sessionInfo

> sessionInfo()
R version 4.4.0 (2024-04-24)
Platform: aarch64-apple-darwin20
Running under: macOS Ventura 13.6.9

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Vancouver
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] fs_1.6.4       tibble_3.2.1   rmarkdown_2.28 kyber_0.1.0   

loaded via a namespace (and not attached):
 [1] jsonlite_1.8.9      dplyr_1.1.4         compiler_4.4.0      gitcreds_0.1.2      tidyselect_1.2.1   
 [6] Rcpp_1.0.13         stringr_1.5.1       credentials_2.0.1   yaml_2.3.10         fastmap_1.2.0      
[11] R6_2.5.1            generics_0.1.3      knitr_1.48          openssl_2.2.2       lubridate_1.9.3    
[16] pillar_1.9.0        rlang_1.1.4         utf8_1.2.4          stringi_1.8.4       xfun_0.47          
[21] sys_3.4.2           timechange_0.3.0    cli_3.6.3           magrittr_2.0.3      digest_0.6.37      
[26] gh_1.4.1            googlesheets4_1.1.1 rstudioapi_0.16.0   askpass_1.2.0       gert_2.1.2         
[31] lifecycle_1.0.4     vctrs_0.6.5         parsermd_0.1.3      evaluate_1.0.0      gargle_1.5.2       
[36] glue_1.7.0          cellranger_1.1.0    googledrive_2.1.1   fansi_1.0.6         purrr_1.0.2        
[41] tools_4.4.0         pkgconfig_2.0.3     htmltools_0.5.8.1  
@stefaniebutland
Copy link
Member Author

I realize this is likely a "me" issue.

@stefaniebutland
Copy link
Member Author

yep. A "me" issue. Cohort name did not match what I had in CohortRegistry

@stefaniebutland
Copy link
Member Author

Sean can you give a helpful error message for this scenario? (pls don't add to Main till I have completed making repos)

My error was CohortRegistry sheet said cohort_name = 2024-noaa-a but I told kyber to look for params: cohort_name: "2024-nmfs-a". Would be ideal if error message indicated a mismatch between these

@stefaniebutland stefaniebutland changed the title Error knitting README.Rmd Better error message for Error knitting README.Rmd Oct 1, 2024
@seankross
Copy link
Contributor

Hey sorry I am just getting here now! Can do.

@seankross seankross self-assigned this Oct 2, 2024
@stefaniebutland
Copy link
Member Author

Encountered another example error, this time when there's a mismatch between cohort_name in CohortRegistry sheet and cohort_id. Could there be a check at start that cohort_id given to kyber matches a cohort name in registry?

Example with error in cohort_id

kyber::call_agenda(
  registry_url = "link to registry", 
  cohort_id = "2021-nmfs-champions-a", 
  call_number = 1)

Error msg:

✔ Reading from OpenscapesChampionsCohortRegistry.
✔ Range ''cohort_metadata''.
New names:
• `` -> `...14`
• `` -> `...15`
• `` -> `...16`
• `` -> `...17`
• `` -> `...18`
• `` -> `...19`
• `` -> `...20`
• `` -> `...21`
✔ Reading from OpenscapesChampionsCohortRegistry.
✔ Range ''call_metadata''.
Error in `filter()`:
ℹ In argument: `cohort_type == cohort_type_`.
Caused by error:
! `..1` must be of size 4 or 1, not size 0.
Run `rlang::last_trace()` to see where the error occurred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants