icews icon indicating copy to clipboard operation
icews copied to clipboard

404 error at download attempt

Open tamirlibel opened this issue 5 years ago • 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.

tamirlibel avatar Apr 19 '20 14:04 tamirlibel

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()

andybega avatar Apr 20 '20 14:04 andybega

Hi @tamirlibel, did you get it working?

andybega avatar May 25 '20 12:05 andybega

Going to close this since it seems it's not an issue anymore.

andybega avatar Jun 02 '20 09:06 andybega

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. Run rlang::last_error() to see where the error occurred."

The script you suggested gives the same error message.

tamirlibel avatar Jun 02 '20 13:06 tamirlibel

Congrats! Hope you are getting some sleep.

(EDIT: wups, didn't realize it would copy your email)

andybega avatar Jun 08 '20 20:06 andybega

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")

andybega avatar Jun 09 '20 12:06 andybega

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.

tamirlibel avatar Jun 22 '20 20:06 tamirlibel

Hi @tamirlibel, sounds like we have moved on to a new error. Could you please do two things for me?:

  1. When you get this error you reported above, could you run traceback() and copy the output here for me?
  2. 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)
    

andybega avatar Jun 29 '20 08:06 andybega