-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Downloads failing, but work with browser user agent #118
Comments
We've gotten a number of error reports about this in the past week; my best guess is that the Census website is undergoing some maintenance or is having some issues. @loganpowell - do you have any thoughts on @rushgeo's suggestion? |
Hi friends. If you're making a lot of calls to any Census address, there's a default policy that will block your IP. If you've been able to make successful gets and then - all of a sudden - are getting errors and then aren't able to get successfully after receiving the error the first time, this is probably happening to you. I have to do heavy pulls using |
This doesn't sound like the scenario I'm experiencing. I'm having this happen from my first attempt on a new machine, and I'm also having intermittent success after previously having errors on another machine. |
In that case, it's unrelated to the issue referenced. What are the addresses |
I've mostly been downloading tracts, which for 2010 come from https://www2.census.gov/geo/tiger/TIGER2010/TRACT/2010/ if the cartographic boundary files aren't requested instead. |
Sorry for the delayed response. Are you still experiencing this issue? |
Not sure if this is the same problem, but I have recently had trouble downloading county subdivisions. The following fails:
I get the following message:
No problem accessing states. Just county subdivisions and smaller geographies, and sometimes it works. Using tigris version 1.4 |
@profLuna I just tested - it is working for me on my local version of R. I've also tested on my server version of R which took a little while to connect to the Census website but is working too. Are you running a server version of R? Downloads seem to fail more frequently there. I'd also always recommend using |
@walkerke Thanks for the quick response. I am running a local version of R. Tried doing with and without a VPN, but same response. Definitely will set local cache to TRUE, although I'm stuck at the moment. Still weird because states and tracts work without a problem. It just seems to be county_subdivisions. |
Hi, I can confirm this same behavior and the issue is ongoing. Specifically, the link specified, for instance, by block_groups is valid for downloading when pasted into a browser. However, from the R environment it fails to download. |
This one's a little tricky to test as I can't reproduce the error; however I'm wondering if heavy use of tigris temporarily clogs certain datasets on the Census website. For example, if I run: > httr:::default_ua()
[1] "libcurl/7.58.0 r-curl/4.3.1 httr/1.4.2" It's possible then that many R users are sending the same user agent to the Census website and intermittently blocking it, given that this user agent will be identical across tigris users with those versions. I'll do some more research on this. |
Can you email our admin, ***@***.***, about this?
Give her as much detail as possible
…On Thu, May 27, 2021, 6:56 AM Kyle Walker ***@***.***> wrote:
This one's a little tricky to test as I can't reproduce the error; however
I'm wondering if heavy use of tigris temporarily clogs certain datasets on
the Census website. For example, if I run:
> httr:::default_ua()
[1] "libcurl/7.58.0 r-curl/4.3.1 httr/1.4.2"
It's possible then that many R users are sending the same user agent to
the Census website and intermittently blocking it, given that this user
agent will be identical across tigris users with those versions. I'll do
some more research on this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#118 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2ACPYUAXN274ER6VSDYHTTPYQNXANCNFSM44KUR72Q>
.
|
I am having the same issue. I can get states and block groups, but zctas fail:
It's been several months since I used tigris. At first I got the following:
I then removed tigris and reinstalled from github, and now get the download error. EDIT: I tried to get zctas again just a minute after posting this, and it worked. |
I am dealing with the same zctas error mentioned above:
I've been experiencing it for about 24 hours, but am not sure if it takes more time for someone to be unblocked if they've made multiple requests. Like jzadra pointed out, zctas seems to be the only geometry affected by this error, but again, I'm not sure if that's because it is the geometry I've been querying most frequently. |
I just ran |
I'm definitely going to use options(tigris_use_cache = TRUE) in the future, but unfortunately, I didn't use that option when I was first scripting. Do you happen to know how long it usually takes for the issue to resolve itself? |
I'm having intermittent problems downloading through
tigris
. Sometimes all three download attempts fail, and other times they succeed. When they fail, the output file in the cache directory will either be zero bytes, or a very short HTML error:Inspired by the discussion here, I added a browser user agent to the downloads. Specifically, I added:
user_agent("Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0")
in every
GET()
call intigris:::load_tiger
This seems to work every time, but I suppose I can't be 100% certain the user agent is doing the trick when there is still intermittent success without the patch.
Still, I wonder if it's worth either:
tigris
either all of the time, or after the first failed download attempt.The text was updated successfully, but these errors were encountered: