Closed bart1 closed 1 year ago
Reprex for this issue
library(vroom)
#> Warning: package 'vroom' was built under R version 4.2.3
library(purrr)
archive_path <- "test_archive.zip"
connections <- map(unzip(archive_path, list = TRUE)$Name, ~ unz(archive_path, .x))
print(connections)
#> [[1]]
#> A connection with
#> description "test_archive.zip:file_001.csv"
#> class "unz"
#> mode "r"
#> text "text"
#> opened "closed"
#> can read "yes"
#> can write "yes"
#>
#> [[2]]
#> A connection with
#> description "test_archive.zip:file_002.csv"
#> class "unz"
#> mode "r"
#> text "text"
#> opened "closed"
#> can read "yes"
#> can write "yes"
vroom(connections)
#> Error in enc2utf8(path): argument is not a character vector
Created on 2023-09-15 with reprex v2.0.2
File: test_archive.zip
I believe the issue is that the check for connection objects in standardise_path
does not handle a list of connections, only a single object https://github.com/tidyverse/vroom/blob/89b6aac8c9c07981a52c28251578deca11810ebd/R/path.R#L29C12-L29C12
I was following this example from the vignette but it seems
vroom
does not accept a list of connection I get the following messagehttps://github.com/tidyverse/vroom/blob/89b6aac8c9c07981a52c28251578deca11810ebd/vignettes/vroom.Rmd#L113-L118