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

vec_rbind() + jsonlite + common class fallback issue #1894

Open
DavisVaughan opened this issue Nov 6, 2023 · 0 comments
Open

vec_rbind() + jsonlite + common class fallback issue #1894

DavisVaughan opened this issue Nov 6, 2023 · 0 comments
Labels
bug an unexpected problem or unintended behavior dplyr op:bind-combine

Comments

@DavisVaughan
Copy link
Member

From tidyverse/dplyr#6896

vctrs::vec_rbind(
  tibble::tibble(msg = jsonlite::toJSON(list("a"), auto_unbox = TRUE)),
  tibble::tibble(msg = jsonlite::toJSON(list("b"), auto_unbox = TRUE))
)
#> Error in `vctrs::vec_rbind()`:
#> ! Can't convert `..1$msg` <json> to match type of `msg` <vctrs:::common_class_fallback>.
#> Backtrace:
#>      ▆
#>   1. ├─vctrs::vec_rbind(...)
#>   2. └─vctrs (local) `<fn>`()
#>   3.   └─vctrs::vec_default_cast(...)
#>   4.     ├─base::withRestarts(...)
#>   5.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
#>   6.     │   └─base (local) doWithOneRestart(return(expr), restart)
#>   7.     └─vctrs::stop_incompatible_cast(...)
#>   8.       └─vctrs::stop_incompatible_type(...)
#>   9.         └─vctrs:::stop_incompatible(...)
#>  10.           └─vctrs:::stop_vctrs(...)
#>  11.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)

Created on 2023-11-06 with reprex v2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior dplyr op:bind-combine
Projects
None yet
Development

No branches or pull requests

1 participant