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

error from safe_check_comment function #80

Open
jeremy-allen opened this issue Nov 11, 2024 · 0 comments
Open

error from safe_check_comment function #80

jeremy-allen opened this issue Nov 11, 2024 · 0 comments

Comments

@jeremy-allen
Copy link

jeremy-allen commented Nov 11, 2024

Code:

library(tidyverse)
library(tidyRSS)

feed <- "http://www.spc.noaa.gov/products/spcacrss.xml"
tidyfeed(feed)

Error:
coming from the safe_check_comment function when that gets passed into purrr::discard() in the RSS parser

Error in `discard()`:
ℹ In index: 3.
Caused by error in `if (is.na(x)) ...`:
! the condition has length > 1

Traceback:

     ▆
  1. ├─global watches(feed)
  2. │ └─tidyRSS::tidyfeed(feed)
  3. │   └─tidyRSS:::rss_parse(response, list, clean_tags, parse_dates)
  4. │     └─tibble::tibble(...)
  5. │       └─tibble:::tibble_quos(xs, .rows, .name_repair)
  6. │         └─rlang::eval_tidy(xs[[j]], mask)
  7. ├─... %>% unlist()
  8. ├─base::unlist(.)
  9. ├─purrr::discard(., safe_check_comment)
 10. │ └─purrr:::where_if(.x, .p, ...)
 11. │   └─purrr:::map_(.x, .p, ..., .type = "logical", .purrr_error_call = .purrr_error_call)
 12. │     ├─purrr:::with_indexed_errors(...)
 13. │     │ └─base::withCallingHandlers(...)
 14. │     ├─purrr:::call_with_cleanup(...)
 15. │     └─purrr (local) .f(.x[[i]], ...)
 16. │       └─tidyRSS (local) .fn(...)
 17. └─base::.handleSimpleError(...)
 18.   └─purrr (local) h(simpleError(msg, call))
 19.     └─cli::cli_abort(...)
 20.       └─rlang::abort(...)

Feed that works at the moment:

feed <- "http://www.spc.noaa.gov/products/spcwwrss.xml"
tidyfeed(feed)

Session info:

R version 4.4.2 (2024-10-31)
Platform: aarch64-apple-darwin20
Running under: macOS Sequoia 15.0.1

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/New_York
tzcode source: internal

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

other attached packages:
[1] tidyRSS_2.0.7 lubridate_1.9.3 forcats_1.0.0 stringr_1.5.1 dplyr_1.1.4
[6] purrr_1.0.2 readr_2.1.5 tidyr_1.3.1 tibble_3.2.1 ggplot2_3.5.1
[11] tidyverse_2.0.0

loaded via a namespace (and not attached):
[1] gtable_0.3.6 jsonlite_1.8.9 compiler_4.4.2 renv_1.0.11
[5] tidyselect_1.2.1 Rcpp_1.0.13-1 xml2_1.3.6 scales_1.3.0
[9] R6_2.5.1 generics_0.1.3 curl_6.0.0 munsell_0.5.1
[13] pillar_1.9.0 tzdb_0.4.0 rlang_1.1.4 utf8_1.2.4
[17] stringi_1.8.4 timechange_0.3.0 cli_3.6.3 withr_3.0.2
[21] magrittr_2.0.3 grid_4.4.2 hms_1.1.3 lifecycle_1.0.4
[25] anytime_0.3.9 vctrs_0.6.5 data.table_1.16.2 glue_1.8.0
[29] fansi_1.0.6 colorspace_2.1-1 httr_1.4.7 tools_4.4.2
[33] pkgconfig_2.0.3

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

1 participant