PolMine / cwbtools

Tools to create and manage CWB-indexed corpora
4 stars 2 forks source link

RCurl::url.exists() inconsistency between macOS/Windows #31

Closed ablaette closed 3 years ago

ablaette commented 3 years ago

The GermaParl package throws an issue when trying to download GermaParl from Zenodo. Apparently, this is an issue with RCurl::url.exists().

The following code returns TRUE on macOS but (falsely) FALSE on Windows.

tarball <- "https://zenodo.org/api/files/0953ee44-a31f-4177-b5c9-b48eb4ddbd96/germaparl_v1.0.6.tar.gz"
RCurl::url.exists(tarball)

As a consequence, you can download GermaParl on macOS but not on Windows. And we have a CRAN issue: https://www.r-project.org/nosvn/R.check/r-devel-windows-ix86+x86_64/GermaParl-00check.html

So this needs to be fixed soon.

ablaette commented 3 years ago

I think we can avoid this error by using httr::http_error() rather than RCurl::url.exists(). See: https://stackoverflow.com/questions/31420210/r-check-existence-of-url-problems-with-httrget-and-url-exists

ablaette commented 3 years ago

Switched to httr::http_error() which apparantly solves the issue.