You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Was getting this cryptic error message in readr::read_delim and traced it to vroom. It occurs when col_select has no valid columns. MWE:
foo <- "a,b,c\n1,2,3\n"
vroom(I(foo), delim=",", col_select=c(d))
# Output:
# Error in UseMethod("collector_value") :
# no applicable method for 'collector_value' applied to an object of class "c('collector_skip', 'collector')"
vroom(I(foo), delim=",", col_select=c(d, e, f))
# Output:
# Error in UseMethod("collector_value") :
# no applicable method for 'collector_value' applied to an object of class "c('collector_skip', 'collector')"
Interestingly, if you read at least one valid column, you get a much nicer error:
I tested on both vroom v 1.6.1 and 1.6.4 and got the same behavior.
Seems related to this issue reported in readr, but not quite. Empty selections using all_of() (as reported there) give nice errors as expected, so this appears to be a separate thing:
Interestingly, I get the cryptic error with any_of() but not with all_of() (as above):
vroom(I(foo), delim=",", col_select=c(any_of("d")))
#> Error in UseMethod("collector_value"): no applicable method for 'collector_value' applied to an object of class "c('collector_skip', 'collector')"
Hello! Was getting this cryptic error message in readr::read_delim and traced it to vroom. It occurs when
col_select
has no valid columns. MWE:Interestingly, if you read at least one valid column, you get a much nicer error:
I tested on both
vroom
v 1.6.1 and 1.6.4 and got the same behavior.Seems related to this issue reported in readr, but not quite. Empty selections using
all_of()
(as reported there) give nice errors as expected, so this appears to be a separate thing:Cheers!
The text was updated successfully, but these errors were encountered: