404 error at download attempt
tamirlibel opened this issue · 8 comments
I am running the following code in order to download the ICEWS data, drawing on the great answer for #51:
library("icews") library("dataverse") Sys.setenv("DATAVERSE_SERVER" = "dataverse.harvard.edu") download_data("~/icews_data/")
I receive the following error message:
Error in dataverse::get_file(file = file_ref, dataset = get_doi()[[repo]]) :
Not Found (HTTP 404).
I'll be grateful for any advice how to solve this.
Hello, is there any other output you get before this error?
Does "~/icews_data/" contain anything you did not put there, i.e. something download_data()
managed to download before error-ing out?
Also, what is the output when you do this?:
library(icews)
library(dplyr)
plan <- icews:::plan_file_changes("~/icews_data/")
plan %>% filter(action!="none") %>% head() %>% dput()
Hi @tamirlibel, did you get it working?
Going to close this since it seems it's not an issue anymore.
Sorry for the late response!
No other output before the error message. Now it gives: "
Error: Tibble columns must have compatible sizes.
- Size 31: Existing data.
- Size 30: Column
category
.
i Only values of size one are recycled.
Runrlang::last_error()
to see where the error occurred."
The script you suggested gives the same error message.
There have been some recent changes to the dataverse repo, this might be related to the new error. I just tried to update/download and also had an error because of a non-standard file name and non-ISO dates in one of the data files.
In any case, could you try these and let me know what the output is? Also if you are still unable to download the data after this?
remotes::install_github("andybega/icews")
packageVersion("dataverse")
packageVersion("icews")
packageVersion("dplyr")
foo = download_data("~/icews_data/", dryrun = TRUE)
foo
download_data("~/icews_data/")
If that doesn't work, could you verify that you have a dataverse API key setup (see https://github.com/IQSS/dataverse-client-r)? I'm not sure if it's actually required as the dataverse documentation is not super clear on this, but if so I'll add it to the README here.
Sys.getenv("DATAVERSE_KEY")
Thanks and sorry for the delay!
I ran the full code several times. I keep getting the following output:
Error in utils::unzip(tmp, exdir = to_dir) : 'exdir' does not exist
I still don't have a dataverse API key but will try to get one over the next phase.
Hi @tamirlibel,
sounds like we have moved on to a new error. Could you please do two things for me?:
- When you get this error you reported above, could you run
traceback()
and copy the output here for me? - Try to manually create the directory you are trying to download data to, e.g. something like:
dir.create("~/icews_data") download_data("~/icews_data", dryrun = FALSE)