ScotGovAnalysis / opendatascot

An R package to pull data from statistics.gov.scot into R
https://scotgovanalysis.github.io/opendatascot/
MIT License
47 stars 6 forks source link

Error: No space left on your device / does not exist in current working directory #109

Closed jsavinc closed 1 year ago

jsavinc commented 1 year ago

As of today (2023-02-16), running any ods function involving queries returns a strange combination of errors. There is plenty of space on my device so I'm not sure what this means?

> opendatascot::ods_all_datasets()

Error: 'There was a syntax error in your query: {"type":"error","error":"unknown-error","message":"No space left on device"}' does not exist in current working directory ('C:/Users/REDACTED')

I've pasted the results of traceback() below:

8: stop("'", path, "' does not exist", if (!is_absolute_path(path)) {
       paste0(" in current working directory ('", getwd(), "')")
   }, ".", call. = FALSE)
7: check_path(path)
6: (function (path, write = FALSE) 
   {
       if (is.raw(path)) {
           return(rawConnection(path, "rb"))
       }
       if (!is.character(path)) {
           return(path)
       }
       if (is_url(path)) {
           if (requireNamespace("curl", quietly = TRUE)) {
               con <- curl::curl(path)
           }
           else {
               rlang::inform("`curl` package not installed, falling back to using `url()`")
               con <- url(path)
           }
           ext <- tolower(tools::file_ext(path))
           return(switch(ext, zip = , bz2 = , xz = {
               close(con)
               stop("Reading from remote `", ext, "` compressed files is not supported,\n", 
    ...
5: vroom_(file, delim = delim %||% col_types$delim, col_names = col_names, 
       col_types = col_types, id = id, skip = skip, col_select = col_select, 
       name_repair = .name_repair, na = na, quote = quote, trim_ws = trim_ws, 
       escape_double = escape_double, escape_backslash = escape_backslash, 
       comment = comment, skip_empty_rows = skip_empty_rows, locale = locale, 
       guess_max = guess_max, n_max = n_max, altrep = vroom_altrep(altrep), 
       num_threads = num_threads, progress = progress)
4: vroom::vroom(file, delim = ",", col_names = col_names, col_types = col_types, 
       col_select = {
           {
               col_select
           }
       }, id = id, .name_repair = name_repair, skip = skip, n_max = n_max, 
       na = na, quote = quote, comment = comment, skip_empty_rows = skip_empty_rows, 
       trim_ws = trim_ws, escape_double = TRUE, escape_backslash = FALSE, 
       locale = locale, guess_max = guess_max, show_col_types = show_col_types, 
       progress = progress, altrep = lazy, num_threads = num_threads)
3: readr::read_csv(content_returned, show_col_types = FALSE)
2: ods_query_database(endpoint, query)
1: opendatascot::ods_all_datasets()
jsavinc commented 1 year ago

Huh, re-running the same code today seems to work fine. There might have been an issue with statistics.gov.scot? I run a script downloading Covid-19 related data which gets updated on a Thursday, so maybe it was related to the update. In any case, this is no longer a problem (see you next Thursday, maybe...)