fredr appears to be completely broken on my R setup
Closed this issue · 6 comments
I have the Ubuntu Focal default R (3.6.3) installed on my server, with RStudio Server running. I am running fredr 2.1.0.
Running the following minimal R script:
library(fredr)
fredr_set_key(api_key_fred)
foo <- fredr(series_id = "SP500")
Yields the following error:
foo <- fredr(series_id = "SP500")
Error: :
Runrlang::last_error()
to see where the error occurred.
rlang::last_error()
<error/rlang_error>
:
Backtrace:
- fredr::fredr(series_id = "SP500")
Runrlang::last_trace()
to see the full context.
rlang::last_trace()
<error/rlang_error>
:
Backtrace:
█
- └─fredr::fredr(series_id = "SP500")
- ├─base::do.call(fredr_request, c(fredr_args, user_args))
- └─(function (endpoint, ..., to_frame = TRUE, print_req = FALSE, ...
Let me know if there's any other info I can give you.
This exact issue has just arisen for me too, this morning. I was right about to post an issue myself.
For context, I was able to use fredr last Friday. This morning I booted up a project file using fredr and received an error. I then tried changing my api to see if that was an issue to no avail. I received the same error.
rlang::last_error()
<error/rlang_error>
:
Backtrace:
- fredr::fredr(...)
Runrlang::last_trace()
to see the full context.
rlang::last_trace
function ()
{
err <- last_error()
err$rlang$internal$print_simplify <- "none"
err
}
<bytecode: 0x000001b627a3bfd8>
<environment: namespace:rlang>
I think the FRED API is just down. Pasting the following into my browser with <MY_KEY>
replaced with my actual key gives me a 500 internal server error
https://api.stlouisfed.org/fred/series/observations?series_id=GNPCA&api_key=<MY_KEY>
I'm having this problem at the moment, and I think it's just that the FRED API is down at the moment.
Using FRED's API link to request a series returns an Internal Server Error: https://api.stlouisfed.org/fred/series?series_id=GNPCA&api_key=abcdefghijklmnopqrstuvwxyz123456
However, it does seem that the error handling in fredr
is also faulty at the moment, and doesn't correctly output the error code and error message, which is why you got a blank error message.
EDIT: Right as I was typing this, I tried it again and it seems to work now (it wasn't working just 2 minutes ago). Do try it again!
It does seem to be back now
It's working again!
@DavisVaughan maybe we can implement an early and informative check to see if the API is down?