mortada / fredapi

Python API for FRED (Federal Reserve Economic Data) and ALFRED (Archival FRED)
Apache License 2.0
902 stars 159 forks source link

Discontinued LIBOR rates - Solved #33

Closed Lucianoris closed 3 years ago

Lucianoris commented 4 years ago

Dear fellow users,

I am getting the following error when using fredapi:

Traceback (most recent call last): File "/xyz/xyz/.local/lib/python3.8/site-packages/fredapi/fred.py", line 64, in __fetch_data response = urlopen(url) File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.8/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response response = self.parent.error( File "/usr/lib/python3.8/urllib/request.py", line 569, in error return self._call_chain(args) File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(args) File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/xyz/xyz/xyz.py", line 18, in DataSetBuilder_1() File "/xyz/xyz/xyz/xyz.py", line 150, in DataSetBuilder_1 x=fred.get_series(x, columns=[y]) File "/xyz/xyz/.local/lib/python3.8/site-packages/fredapi/fred.py", line 131, in get_series root = self.__fetch_data(url) File "/xyz/xyz/.local/lib/python3.8/site-packages/fredapi/fred.py", line 68, in __fetch_data raise ValueError(root.get('message')) ValueError: Not Found. The series does not exist.

Does anybody have a clue of what this is about? Thanks in advance!

Liam3851 commented 4 years ago

The error says that the series does not exist. Usually that means you have a typo. What series did you request?

Lucianoris commented 4 years ago

Thanks. The code has always worked fine. The issue someone else has pointed out is that "Looks like the API library is outdated and the actual API endpoints have changed". Could this be the case? Many thanks

Liam3851 commented 4 years ago

@lucianoris It's working just fine for me with fred.get_series('CPIAUCSL'). I'm using fredapi 0.4.2, python 3.7.7. Since you've truncated the whole part of your stack trace that references your call to fredapi (are you using get_series or something else? what series are you requesting?) it's hard to reproduce your problem.

datarocksAmy commented 4 years ago

I'm getting the same error with the following series ids:

It was working just fine before. The error starts occurring after 09/13/2020. The other rates that I use are still working just fine. See following :

Using Python Version : 3.7.3 | fredapi Version : 0.4.2

Lucianoris commented 3 years ago

Please see https://github.com/mortada/fredapi/issues/34. This is solved now.