ajdamico / lodown

locally download and prepare publicly-available microdata
GNU General Public License v3.0
97 stars 47 forks source link

fix nhanes #70

Closed ajdamico closed 7 years ago

ajdamico commented 7 years ago

nhanes catalog entry 306 of 1016 stored at 'R:/National Health and Nutrition Exa mination Survey//2009-2010/dtq_f.rds'

Downloading from URL 'https://wwwn.cdc.gov#' to file 'C:\Users\AnthonyD\AppData\Local\Temp\4\RtmpyYHyXW\file88870c017ac'

lodown is now exiting unexpectedly. websites that host publicly-downloadable microdata change often and sometimes th ose changes cause this software to break. if the error call stack below appears to be a hiccup in your internet connection , then please verify your connectivity and retry the download. otherwise, please open a new issue at https://github.com/ajdamico/lodown/issues with the contents of this error call stack and also the output of your sessio nInfo().

[[1]] lodown::lodown("nhanes", output_dir = "R:/National Health and Nutrition Examinat ion Survey/")

[[2]] withCallingHandlers(catalog <- load_fun(data_name = data_name, catalog, ...), error = function(e) { if (grepl("cannot allocate vector of size", e)) message(memory_note) else if (grepl("parameter must be specified", e)) message(parameter_note) else if (grepl("to install", e)) message(installation_note) else { message(unknown_error_note) print(sys.calls()) } })

[[3]] load_fun(data_name = data_name, catalog, ...)

[[4]] cachaca(catalog[i, "full_url"], tf, mode = "wb")

[[5]] rcurl_filesize(this_url)

[[6]] RCurl::getURL(url, nobody = 1L, header = 1L)

[[7]] curlPerform(curl = curl, .opts = opts, .encoding = .encoding)

[[8]] function (type, msg, asError = TRUE) { if (!is.character(type)) { i = match(type, CURLcodeValues) typeName = if (is.na(i)) character() else names(CURLcodeValues)[i] } typeName = gsub("^CURLE_", "", typeName) fun = (if (asError) stop else warning) fun(structure(list(message = msg, call = sys.call()), class = c(typeName, "GenericCurlError", "error", "condition"))) }(6L, "Could not resolve host: wwwn.cdc.gov#", TRUE)

[[9]] fun(structure(list(message = msg, call = sys.call()), class = c(typeName, "GenericCurlError", "error", "condition")))

[[10]] (function (e) { if (grepl("cannot allocate vector of size", e)) message(memory_note) else if (grepl("parameter must be specified", e)) message(parameter_note) else if (grepl("to install", e)) message(installation_note) else { message(unknown_errornote) print(sys.calls()) } })(list(message = "Could not resolve host: wwwn.cdc.gov#", call = function (type , msg, asError = TRUE) { if (!is.character(type)) { i = match(type, CURLcodeValues) typeName = if (is.na(i)) character() else names(CURLcodeValues)[i] } typeName = gsub("^CURLE", "", typeName) fun = (if (asError) stop else warning) fun(structure(list(message = msg, call = sys.call()), class = c(typeName, "GenericCurlError", "error", "condition"))) }(6L, "Could not resolve host: wwwn.cdc.gov#", TRUE)))

Error in function (type, msg, asError = TRUE) : Could not resolve host: wwwn.cdc.gov#