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

No links have text 'download your files here' #3

Open
carriec opened this issue Sep 17, 2019 · 11 comments
Open

No links have text 'download your files here' #3

carriec opened this issue Sep 17, 2019 · 11 comments

Comments

@carriec
Copy link
Contributor

carriec commented Sep 17, 2019

Hello,

I am trying to use icpsrdata to download some datasets from ICPSR. I am following your help file example

library(icpsrdata)

icpsr_download(file_id = 36138)

and receive the following error:

Downloading ICPSR file: 36138 (2019-09-17 17:37:34)
Error: No links have text 'download your files here'

I am wondering if maybe the website has changed since the creation of the package?

Thanks in advance for your help and for writing the package!

@fsolt
Copy link
Owner

fsolt commented Sep 18, 2019

I've just run that code without problem here. Can you confirm that the username and password combination you have saved to your .Rprofile (you have something saved, right? otherwise the fxn would issue a prompt) allow you to download the file if you try directly from the ICPSR website right now? I'm guessing that this may be an issue with your ICPSR account--that is, your username (currently) only works when you're on campus, and you're off campus right now. If I'm right, the fix is pretty easy: downloading from on-campus once will re-enable your account for off-campus downloads.

@carriec
Copy link
Contributor Author

carriec commented Sep 18, 2019

You're right, it was an email and password issue. Thank you so much for the fast reply. Everything is working fine now.

@carriec carriec closed this as completed Sep 18, 2019
@lin-jennifer
Copy link

Hi:

I am getting this same issue but I am using the correct username/password and logged in to an on-campus VPN (I am also authorized for off-campus download). I tried running the code posted by the original post and I get the same error. I was wondering if you have insights as to how I can fix this.

Thank you!

@fsolt
Copy link
Owner

fsolt commented Jul 12, 2020

As I've dealt with this myself in the past couple of weeks, I'm betting it's still a username/password issue. ICPSR periodically de-authorizes users from off-campus downloads, even with VPN (I don't know how they know, but they know). Contacting your on-campus ICPSR rep and asking them to get you re-authorized will do the trick. Took about a day in my case.

So: please try to download some dataset straight from the ICPSR website—the old-fashioned way, from the web, not in R. If you can do this, then I lose my bet and we'll have to troubleshoot further. If not, email your campus rep.

Either way, let me know.

@lin-jennifer
Copy link

Hi:

Thank you for this information.

I can try the campus representative route, but my profile currently says that I am authorized for off-campus download until 2021-01-08.

I also copied/pasted my R email/password specifications to the online login fields and logged into ICPSR just fine. I am also able to download from the online platform, the old-fashioned way, without a problem.

Thank you so much!

@MatthewRichardsonICPSR
Copy link

ICPSR off-campus logins basically work for 6 months after your last on-campus login. Due the pandemic, we're working on changing the access model to so that it will be easier to enable student access without any sort of campus visit, but that's still in development. Based upon this comment thread, I'll be letting my boss know that we really should start working on that sooner.

@jbullock35
Copy link

Due the pandemic, we're working on changing the access model to so that it will be easier to enable student access without any sort of campus visit, but that's still in development. Based upon this comment thread, I'll be letting my boss know that we really should start working on that sooner.

Thank you, @MatthewRichardsonICPSR. For whatever it's worth, I'm faculty, and I've begun to have the same issue. The example given by @carriec fails for me, too. A week ago, I think that it would have succeeded. (I was successfully using the icpsrdata package a week ago.) And I still have no problem logging on to the ICPSR website from an off-campus location and "manually" downloading datasets.

@fsolt
Copy link
Owner

fsolt commented Jul 13, 2020

Very much appreciated, @MatthewRichardsonICPSR!

Given, though, that I just had my account reauthorized on June 20 (I thought it was even more recent than that, but, you know, Covid time, you can't trust it), and I, too, can now reproduce the error (sigh), it seems the work to do is likely on my end.

Like @jbullock35, I was just using the package successfully quite recently. Oh well . . .

@fsolt fsolt reopened this Jul 13, 2020
@MatthewRichardsonICPSR
Copy link

You're currently using a download script that has been phased out.

url <- paste0("http://www.icpsr.umich.edu/cgi-bin/bob/zipcart2?path=ICPSR&study=", item, "&bundle=all&ds=&dups=yes")

The new download setup is a little more involved. If I attempt to download the R package for study 34743, my final URL looks like:

https://www.icpsr.umich.edu/web/ICPSR/studies/34743/versions/V1/download/rdata?path=/pcms/studies/0/3/4/7/34743/V1

Updating the URL may work with your code. I can't be certain, though. Unfortunately, version number is required. :(

@fsolt fsolt closed this as completed in 8392bfc Jul 13, 2020
@fsolt
Copy link
Owner

fsolt commented Jul 13, 2020

Thanks, Matthew! I figured out a quick fix to get the old code up and going for @lin-jennifer and others who need a quick fix (install from GitHub, please, if you want, y'all). I'm going to keep working on this, though, because that old link may go away at any time (right?) and because having a version number is actually a feature, not a bug, from a reproducibility point of view.

@fsolt fsolt reopened this Jul 13, 2020
@fsolt
Copy link
Owner

fsolt commented Jul 18, 2020

As the bigger fix is going to take me a while, the quick fix is now on CRAN.

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

5 participants