Closed ErkanCDU closed 9 years ago
that's weird - this actually works fine for me. What version of fredapi
are you using?
Oh ... I think this is probably because you are on an older version of pandas, what's your pandas version?
@ErkanCDU upgrading to fredapi 0.3.6
should fix your issue.
Hi,
thanks for the quick comments. I am now convinced that something is wrong with my system. After reinstalling the packages, a different error pops up. I will let you know when I have found the solution
Traceback (most recent call last):
File "
Ah I see, does seem like a problem on your system. I'd recommend using Anaconda to manage your python modules https://store.continuum.io/cshop/anaconda/
The version control was indeed the issue, after reinstalling everything (via Anaconda as you suggested, it works now). Thanks. Case closed.
Just a standard example gives an error: from fredapi import Fred fred = Fred(api_key='..') data = fred.get_series('GDP')
tried restarting and playing around with various date import commands, but the simple code
gives the error output:
Traceback (most recent call last): File "", line 254, in run_nodebug
File "..FredDL.py", line 32, in
data = fred.get_series('GDP')
File "C:\Python27\lib\site-packages\fredapi\fred.py", line 132, in get_series
data[self._parse(child.get('date'))] = val
File "C:\Python27\lib\site-packages\fredapi\fred.py", line 65, in _parse
return to_datetime(date_str, format=format).to_datetime()
AttributeError: 'datetime.datetime' object has no attribute 'to_datetime'