Open patrickmdnet opened 4 years ago
Looking at this a little closer, there is a method in to_data_raw.R#L75 called .download
that has a bunch of error handling to deal with cross-platform issues with utils::file.download
.
The error I saw is triggered by util-file.R#L149 .unzip-single
which calls utils::file.download
without any of the error handling.
Possible fixes are
.unzip-single
to use the .download
method.download
into .unzip-single
.
I noticed when running
icd::download_all_icd_data()
on a freshly imaged Windows build (Windows Server 2016 Standard) that I received this error message:The reason for the error is that there is no "curl.exe" installed and in the PATH of the machine I was using.
Reproduction is easiest by clearing the cache of
LIBCIM10MULTI.TXT
and runningicd:::.dl_icd10fr2019()
.I see that icd uses
utils::download
withmethod="curl"
. What would be best is a better error message to the effect that "curl.exe is not present." Also, the documentation should be updated to clarify that curl.exe is a dependency.I tried using method "auto", but the downloaded zipfile was corrupted somehow. I did not take the time to look into it further. I figure there is a reason you use method="curl".
What are your thoughts?