Closed DenaNico1 closed 8 months ago
Could you try again and after you get the error run rlang::last_trace()
and paste here the output? But I think this is a duplicate of the recent fixed bug reported in #788
Unfortunately, I cannot reproduce it as I am not paying the "basic" subscription to the API. It would help if you provided some funds or the patch to fix them. Thanks.
here is the result of rlang::last_trace() :
rlang::last_trace()
<error/rlang_error>
Error in `httr2::req_perform()`:
! Failed to parse error body with method defined in `req_error()`.
Caused by error in `FUN()`:
! is.list(x) n'est pas TRUE
---
Backtrace:
x
1. \-rtweet::tweet_search_recent(...)
2. \-rtweet:::pagination(req_final, n_pages, n, verbose)
3. \-httr2::req_perform(req)
4. \-httr2:::handle_resp(req, resp, error_call = error_call)
5. \-httr2:::error_body(req, resp, error_call)
6. +-rlang::try_fetch(...)
7. | +-base::tryCatch(...)
8. | | \-base (local) tryCatchList(expr, classes, parentenv, handlers)
9. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
10. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler)
11. | \-base::withCallingHandlers(...)
12. \-httr2:::req_policy_call(req, "error_body", list(resp), default = NULL)
13. +-rlang::exec(req$policies[[name]], !!!args)
14. \-rtweet (local) `<fn>`(`<httr2_rs>`)
15. +-base::do.call(rbind, lapply(r$errors, list2DF))
16. \-base::lapply(r$errors, list2DF)
17. \-base (local) FUN(X[[i]], ...)
18. \-base::stopifnot(is.list(x), is.null(nrow) || nrow >= 0L)
19. \-base::stop(simpleError(msg, call = if (p <- sys.parent(1L)) sys.call(p)))
Run rlang::last_trace(drop = FALSE) to see 4 hidden frames.
I think it is fixed in recent changes. Let me know if you try again and it fails with the same error. Thanks for reporting the issue.
hello, I'd like some help collecting tweets based on hastags and a specific country (for example Burkina Faso). here's my code:
Expected behavior
Reproduce the problem
rtweet version
Session info