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

404 error at download attempt #52

Open
tamirlibel opened this issue Apr 19, 2020 · 8 comments
Open

404 error at download attempt #52

tamirlibel opened this issue Apr 19, 2020 · 8 comments

Comments

@tamirlibel
Copy link

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.

@andybega
Copy link
Owner

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
Copy link
Owner

Hi @tamirlibel, did you get it working?

@andybega
Copy link
Owner

andybega commented Jun 2, 2020

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

@andybega andybega closed this as completed Jun 2, 2020
@tamirlibel
Copy link
Author

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.

@andybega
Copy link
Owner

andybega commented Jun 8, 2020 via email

@andybega andybega reopened this Jun 8, 2020
@andybega
Copy link
Owner

andybega commented Jun 9, 2020

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

@tamirlibel
Copy link
Author

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.

@andybega
Copy link
Owner

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants