nevrome / covid19germany

R package - Load, visualise and analyse daily updated data on the COVID-19 outbreak in Germany
Other
46 stars 8 forks source link

Strange download issues caused by utils::download.file #45

Closed stschiff closed 3 years ago

stschiff commented 3 years ago

I experience strange downloading issues. When executing

> rki <- covid19germany::get_RKI_timeseries()

I get

Downloading file...
trying URL 'https://www.arcgis.com/sharing/rest/content/items/f10774f1c63e40168479a1feb6c7ca74/data'
Error in utils::download.file(url, naked_download_file) : 
  cannot open URL 'https://www.arcgis.com/sharing/rest/content/items/f10774f1c63e40168479a1feb6c7ca74/data'
In addition: Warning message:
In utils::download.file(url, naked_download_file) :
  URL 'https://www.arcgis.com/sharing/rest/content/items/f10774f1c63e40168479a1feb6c7ca74/data': status was 'SSL connect error'

I tried directly downloading the file indicated in the error messages using a browser, and it worked. I tried using utils::download.file and that produces the error.

So as this seems to be related to utils::download.file and hence not to this package, this is likely not something we can fix here... I just thought that perhaps someone has an idea...

nevrome commented 3 years ago

utils::download.file has a method argument with the options internal, wininet, libcurl, wget and curl. Would you mind trying of any of these work?

On which OS and R version are you? I can not reproduce the error with R 4.0.3 (which is then also the utils version number) on Linux 5.4.89-1-MANJARO

stschiff commented 3 years ago

I think this is resolved as well.