mortada / fredapi

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

'xml.etree.ElementTree.Element' object has no attribute 'getchildren' #41

Closed LazyTrader closed 3 years ago

LazyTrader commented 3 years ago

Hi All,

I am attempting to retrieve data in the following manner:

from fredapi import Fred fred = Fred(api_key = 'MyAPIKey') data = fred.get_series('SP500')

But doing so results in the error:

'xml.etree.ElementTree.Element' object has no attribute 'getchildren'

Is this due to a missing dependency and is there a workaround available?

mortada commented 3 years ago

sounds like the same issue as this one? https://github.com/mortada/fredapi/issues/36

mortada commented 3 years ago

if so, simply upgrade to the latest version of fredapi

LazyTrader commented 3 years ago

Just realised that the version I got from conda-forge is 0.4.2. Is it possible to get conda forge to upload version 0.4.3?

mortada commented 3 years ago

interesting, I actually only upload to pip, not sure how it got uploaded to conda-forge

https://anaconda.org/conda-forge/fredapi

drewsaunders commented 2 years ago

I have an Anaconda installation, as well. I installed with conda (which only gets 0.4.2), then upgraded with pip: pip install --upgrade fredapi This gets 0.4.3 from pypi. I am hoping this will minimize the chance of some conflicts. So far (which isn't very), so good! Drew