Unzip returns error 1 for a zip file in R [closed]

余生颓废 提交于 2019-12-22 06:41:33

问题


I am trying to load a medium sized zipped archive (.zip file ~140 Mb) that can be found here (direct link) (source: Deutsche Bundesbank (website)). After downloading the file it is saved as "BKK-Download.zip". The file contains ~50.000s xml files with some rather strange names (such as "bbai3.q.de.n.v.bf90.f.kv.a1.s.2.n.e.z.xml") in three subfolders.

In a first step I try to open the "tree.xml" file in the "tree" folder, in a second step I will open the file using the XML package. I try the first step by using the unzip function:

f.path <- "path to the file"
dat <- unzip(paste0(f.path, "BKK-Download.zip"))

library(XML)
xml.content <- xmlParse(dat[1]) 
# for the case that "tree.xml" is the first xml-file

But instead, the unzip-command returns the following error:

Warning message:
In unzip(paste0(f.path, "BKK-Download.zip")) :
  error 1 in extracting from zip file

If I try this with a test zip-archive with multiple folders and complicated file names (like the one mentioned above) everything works fine.

Any ideas why this error might occur?

来源:https://stackoverflow.com/questions/32785944/unzip-returns-error-1-for-a-zip-file-in-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!