JECSand / yahoofinancials

A powerful financial data module used for pulling data from Yahoo Finance. This module can pull fundamental and technical data for stocks, indexes, currencies, cryptos, ETFs, Mutual Funds, U.S. Treasuries, and commodity futures.
https://pypi.python.org/pypi/yahoofinancials
MIT License
911 stars 215 forks source link

TypeError: 'dict_keys' in yahoofinancials/__init__.py line 470 for python 3.x #1

Closed crendon8 closed 6 years ago

crendon8 commented 6 years ago

I followed the instructions from a similar issue found on stackoverflow: https://stackoverflow.com/questions/17322668/typeerror-dict-keys-object-does-not-support-indexing

and applied the same logic to line 470. I replaced: date_key = re_data[self.ticker][0].keys()[0]

with: date_key = list(re_data[self.ticker][0])[0]

and works for me. -Carlos

JECSand commented 6 years ago

Thanks for sharing that. I'll go ahead and make a minor fix for that.

JECSand commented 6 years ago

Issue Fixed with v0.5 release.