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

fetch_player_details_footywire returns error when fetching non-current player details #208

Open
databatch opened this issue Feb 26, 2024 · 0 comments

Comments

@databatch
Copy link

databatch commented Feb 26, 2024

fitzRoy::fetch_player_details_footywire returns an error when the 'current' argument is set to FALSE.

> fitzRoy::fetch_player_details_footywire('Richmond',
+                                         current = FALSE)
ℹ Fetching past player details for Richmond - this takes some time!
Error in `map()`:In index: 1.
Caused by error in `open.connection()`:
! HTTP error 404.
Run `rlang::last_trace()` to see where the error occurred.
> rlang::last_trace()
<error/purrr_error_indexed>
Error in `map()`:In index: 1.
Caused by error in `open.connection()`:
! HTTP error 404.
---
Backtrace:1. ├─fitzRoy::fetch_player_details_footywire("Richmond", current = FALSE)
  2. │ └─fitzRoy:::fetch_player_details_footywire_past(team)
  3. │   └─players_url %>% cli::cli_progress_along() %>% ...
  4. ├─purrr::map_dfr(., get_past_player_footywire)
  5. │ └─purrr::map(.x, .f, ...)
  6. │   └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
  7. │     ├─purrr:::with_indexed_errors(...)
  8. │     │ └─base::withCallingHandlers(...)
  9. │     ├─purrr:::call_with_cleanup(...)
 10. │     └─fitzRoy (local) .f(.x[[i]], ...)
 11. │       ├─rvest::read_html(...)
 12. │       └─xml2:::read_html.default(...)
 13. │         ├─base::suppressWarnings(...)
 14. │         │ └─base::withCallingHandlers(...)
 15. │         ├─xml2::read_xml(x, encoding = encoding, ..., as_html = TRUE, options = options)
 16. │         └─xml2:::read_xml.character(...)
 17. │           └─xml2:::read_xml.connection(...)
 18. │             ├─base::open(x, "rb")
 19. │             └─base::open.connection(x, "rb")
 20. └─base::.handleSimpleError(...)
 21.   └─purrr (local) h(simpleError(msg, call))
 22.     └─cli::cli_abort(...)
 23.       └─rlang::abort(...)
@databatch databatch changed the title fetch_player_details_footywire returns error when attempting to fetch details of retired players fetch_player_details_footywire returns error when fetching non-current player details Feb 26, 2024
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