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

the 'wininet' method for ftp:// URLs is defunct #34

Closed
TugayArslan opened this issue Apr 28, 2022 · 3 comments
Closed

the 'wininet' method for ftp:// URLs is defunct #34

TugayArslan opened this issue Apr 28, 2022 · 3 comments

Comments

@TugayArslan
Copy link

'C:/Users/A1059380/AppData/Local/Temp/RtmpcbhB7B/hourly_air_temperature_historical_stundenwerte_TU_00003_19500401_20110331_hist.zip'
Warning: 1 Download has failed (out of 1). download.file error:
the 'wininet' method for ftp:// URLs is defunct

I get this error when I use selectDWD() then dataDWD(). I have R 4.2 installed.

@TugayArslan
Copy link
Author

dataDWD(..., dfargs = list(method="curl")

This fixes the issue, but dataDWD should have this failsafe mechanism in place if the initial config on download.file doesn't work.

@brry
Copy link
Owner

brry commented May 2, 2022

Thanks for reporting with a specific example! I saw the warning plop up a few times in updating the indexes but could not locate it yet.

Both of the following code examples work fine on my Windows PC:

library(rdwd)
link <- selectDWD("", "hourly", "air_temperature", "h", id=3)
airt <- dataDWD(link, dir=locdir())
airt <- dataDWD(link, dir=locdir(), dfargs=list(method="curl"))

I could add a direct method argument like dbin, maybe defaulting to getOption("rdwdmethod", default="auto").

Or should we hint to (or default to) options(download.file.method="curl")?

@brry
Copy link
Owner

brry commented May 12, 2022

I added an argument method defaulting to getOption("download.file.method")

@brry brry closed this as completed in d49afd2 May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants