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

nomis_get_data appears to have stopped working #31

Closed
AlexStead opened this issue Mar 16, 2022 · 5 comments
Closed

nomis_get_data appears to have stopped working #31

AlexStead opened this issue Mar 16, 2022 · 5 comments

Comments

@AlexStead
Copy link

AlexStead commented Mar 16, 2022

nomis_get_data() was previously working fine for me but now throws up an error message. E.g.

nomis_get_data(id = "NM_893_1", time = "latest", geography = "TYPE266")

Recently, no problem when I run this. But now I get an error message (below). I've tried different requests to no avail.

Other commands (e.g. nomis_get_metadata appear to be working so this appears to be a bug rather than an issue with the API.

It is likely that you have been automatically rate limited by the Nomis API.
You can make smaller data requests, or try again later.

Here's the original error message:
Error in readr::read_csv(x, locale = readr::locale(encoding = encoding), : unused argument (show_col_types = FALSE)

Error: $ operator is invalid for atomic vectors```
@evanodell
Copy link
Collaborator

I can't reproduce the error. Have you been making a lot of calls to Nomis? It does rate limit, although the limit is not transparent.

@AlexStead
Copy link
Author

After successfully trying out the same command elsewhere, it does seem to be rate limiting.

But this is odd, as I haven't made any calls to Nomis for a couple of months, at least. December-January I was making lots.

Have you encountered this before? How long before the rate limiting is ended?

@owenjonesuob
Copy link

tl;dr: try updating {readr} and have another go!


From the error message which {nomisr} helpfully shows us, it seems like the problem might be something to do with an argument called show_col_types, within a call to readr::read_csv(), which happens... somewhere. Not sure yet. Let's dig into what {nomisr} is doing behind the scenes:

@evanodell for this reason it might be worth adding readr >= 2.1.2 to {nomisr}'s DESCRIPTION file, even though it's not used directly. Or alternatively, checking the installed version of {readr} and passing the version-appropriate silencing arg via ....

I'm guessing the different environments you were using @AlexStead had different versions of {readr} installed, one of which must have been older. Hopefully the possible rate limiting was a red herring!

@evanodell
Copy link
Collaborator

@owenjonesuob Good find, I'll update that shortly.

@evanodell
Copy link
Collaborator

Fixed in 2086995

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

3 participants