MattCowgill / readabs

Download and tidy time series data from the Australian Bureau of Statistics in R
https://mattcowgill.github.io/readabs/
Other
101 stars 22 forks source link

Error `cannot coerce type 'closure' to vector of type 'character'` due to ABS website issue #242

Closed ZacMuscat closed 10 months ago

ZacMuscat commented 10 months ago

I have been using the read abs package for sometime, thank you for your contribution.

Today (10 Dec 23) i tried running one of my scripts which i have been using weekly for the past 18-months. The specific function is:

DATA <- read_abs(series_id = "A2304372W")

The above function no longer imported the specified series but gave me the error:

Finding URLs for tables corresponding to ABS series IDA2304372W Attempting to download files from series IDA2304372W, Australian National Accounts: National Income, Expenditure and Product trying URL 'https://www.abs.gov.au/statistics/economy/national-accounts/australian-national-accounts-national-income-expenditure-and-product/latest-release/5206001_key_aggregates.xlsx' trying URL 'https://www.abs.gov.au/statistics/economy/national-accounts/australian-national-accounts-national-income-expenditure-and-product/latest-release/5206001_key_aggregates.xls' Error in FUN(X[[i]], ...) : cannot coerce type 'closure' to vector of type 'character'

I tried running this script on two different computers, and i tried re-installing the read.abs package as well but not luck. Hopefully this is an easy fix.

MattCowgill commented 10 months ago

Hi @ZacMuscat I got an email from the ABS late on Friday notifying me of a problem with the ABS Time Series Directory that will affect readabs users. I believe this is the cause of your issue. The ABS assures me this will be fixed ASAP. It’s not an issue with the package itself and isn’t something I can remedy. Sorry for the inconvenience.

Matt

MattCowgill commented 10 months ago

@ZacMuscat I’m on my laptop right now. Later this evening I’ll see if I can write some code that works around the ABS issue.

MattCowgill commented 10 months ago

@ZacMuscat

The ABS problem is related to fetching the "latest issue" data without specifying the release date. While we wait for the ABS to resolve this (I hope today), you can fetch the data by specifying the release date, as in:

read_abs(series_id = "A2304372W",
         release_date = "2023-09-01")

Or in your case @jasemurphy,

read_abs("5601.0", release_date = "2022-10-01")

Note that the 'release date' should be the 'reference period' for the data, as in the examples above.

I'll update this thread when the ABS notifies me the problem has been resolved.

ZacMuscat commented 10 months ago

Good morning,

Thank you for the update, much appreciated.

Zac Muscat

On Mon, 11 Dec 2023, 05:51 Matt Cowgill, @.***> wrote:

@ZacMuscat https://github.com/ZacMuscat

The ABS problem is related to fetching the "latest issue" data without specifying the release date. While we wait for the ABS to resolve this (I hope today), you can fetch the data by specifying the release date, as in:

read_abs(series_id = "A2304372W", release_date = "2023-09-01")

Or in your case @jasemurphy https://github.com/jasemurphy,

read_abs("5601.0", release_date = "2022-10-01")

Note that the 'release date' should be the 'reference period' for the data, as in the examples above.

I'll update this thread when the ABS notifies me the problem has been resolved.

— Reply to this email directly, view it on GitHub https://github.com/MattCowgill/readabs/issues/242#issuecomment-1849097606, or unsubscribe https://github.com/notifications/unsubscribe-auth/BESNB5DQO2PSI4665SWVN7DYIYVG5AVCNFSM6AAAAABAOHRPGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBZGA4TONRQGY . You are receiving this because you were mentioned.Message ID: @.***>

Wade008 commented 10 months ago

@ZacMuscat

The ABS problem is related to fetching the "latest issue" data without specifying the release date. While we wait for the ABS to resolve this (I hope today), you can fetch the data by specifying the release date, as in:

read_abs(series_id = "A2304372W",
         release_date = "2023-09-01")

Or in your case @jasemurphy,

read_abs("5601.0", release_date = "2022-10-01")

Note that the 'release date' should be the 'reference period' for the data, as in the examples above.

I'll update this thread when the ABS notifies me the problem has been resolved.

Thanks for following up on this and for providing a work around.

MattCowgill commented 10 months ago

Hi, I have been informed by the ABS that they've resolved the issue on their side. I've confirmed that readabs::read_abs() now works again, with no update to the package or modifications to your code required.

@jasemurphy @Wade008 @ZacMuscat

HughParsonage commented 10 months ago

Looks to be a nontrivial change: https://github.com/HughParsonage/ABS-Catalogue/commit/18cd6348862f56990e4ded2d799e04ed186722b4

MattCowgill commented 10 months ago

Is that showing revisions to actual data @HughParsonage?

Wade008 commented 10 months ago

Hi, I have been informed by the ABS that they've resolved the issue on their side. I've confirmed that readabs::read_abs() now works again, with no update to the package or modifications to your code required.

@jasemurphy @Wade008 @ZacMuscat

Thanks again Matt.

HughParsonage commented 10 months ago

@MattCowgill Yes. (Or at least revisions to data obtained in identical ways via readabs.)