-
Notifications
You must be signed in to change notification settings - Fork 170
Description
Using clean Anaconda install with JupyterLab notebook in a dedicated virtual environment:
from fredapi import Fred
fred = Fred(api_key='#####')
data = fred.get_series('SP500')
AttributeError Traceback (most recent call last)
Cell In[7], line 1
----> 1 data = fred.get_series('SP500')
File ~\anaconda3\envs\venv_1\Lib\site-packages\fredapi\fred.py:135, in Fred.get_series(self, series_id, observation_start, observation_end, **kwargs)
133 raise ValueError('No data exists for series id: ' + series_id)
134 data = {}
--> 135 for child in root.getchildren():
136 val = child.get('value')
137 if val == self.nan_char:
AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getchildren'
I am still quite new to python, and suppose it is something obvious, but I have no idea why this isn't working since it looks very straight forward in all the docs.
Any help would be appreciated!