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

zip fails to unzip and list files #100

Open
hhmacedo opened this issue May 8, 2023 · 4 comments
Open

zip fails to unzip and list files #100

hhmacedo opened this issue May 8, 2023 · 4 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@hhmacedo
Copy link

hhmacedo commented May 8, 2023

I tried to unzip this public available file

> zip::zip_list("PENSE_2009_microdados.zip")
Error in zip::zip_list("PENSE_2009_microdados.zip") : 
  Cannot open zip file `C:\Users\Hugo\Documents\PENSE_2009_microdados.zip`
> zip::unzip("PENSE_2009_microdados.zip")
Error in zip::unzip("PENSE_2009_microdados.zip") : 
  zip error: Cannot open zip file `C:\Users\Hugo\Documents\PENSE_2009_microdados.zip` for reading in file zip.c:141

Providing some extra info:

> sessionInfo()
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=Portuguese_Brazil.utf8  LC_CTYPE=Portuguese_Brazil.utf8   
[3] LC_MONETARY=Portuguese_Brazil.utf8 LC_NUMERIC=C                      
[5] LC_TIME=Portuguese_Brazil.utf8    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] here_1.0.1       fansi_1.0.4      utf8_1.2.3       dplyr_1.1.0     
 [5] rprojroot_2.0.3  bitops_1.0-7     R6_2.5.1         lifecycle_1.0.3 
 [9] magrittr_2.0.3   zip_2.3.0        pillar_1.8.1     stringi_1.7.12  
[13] rlang_1.1.0      cli_3.6.0        rstudioapi_0.14  vctrs_0.6.0     
[17] generics_0.1.3   tools_4.2.2      stringr_1.5.0    glue_1.6.2      
[21] RCurl_1.98-1.10  purrr_1.0.1      compiler_4.2.2   pkgconfig_2.0.3 
[25] tidyselect_1.2.0 tibble_3.2.0
@gaborcsardi gaborcsardi added the bug an unexpected problem or unintended behavior label May 8, 2023
@fpusan
Copy link

fpusan commented Nov 19, 2023

Can reproduce

R version 4.1.3 (2022-03-10)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Ubuntu 20.04.6 LTS

Matrix products: default
BLAS/LAPACK: /home/fer/.local/opt/miniconda3/envs/SqueezeMeta_dev/lib/libopenblasp-r0.3.24.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=sv_SE.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=sv_SE.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=sv_SE.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=sv_SE.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.1.3 zip_2.3.0     

@ludvigla
Copy link

I'm getting the exact same errors with zip_list and unzip, but only with files larger than 2GB. Any updates?

session info:

R version 4.4.1 (2024-06-14)
Platform: aarch64-apple-darwin20.0.0
Running under: macOS Sonoma 14.4

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Users/ludviglarsson/micromamba/envs/r-pmx/lib/liblapack.3.9.0.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Stockholm
tzcode source: system (macOS)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.4.1    tools_4.4.1       rstudioapi_0.16.0

@gaborcsardi
Copy link
Member

For the file in the OP, the error from miniz is "invalid header or archive is corrupted". If I update miniz to 3.0.2 then I still get the same error message.

So I am afraid there isn't much that I can do here, apart from dropping miniz in favor for another zip library.

@ludvigla
Copy link

ludvigla commented Jan 7, 2025

Thanks for the clarification @gaborcsardi!

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
Projects
None yet
Development

No branches or pull requests

4 participants