Closed jaredre closed 3 years ago
I think there was an error in my code, thanks for raising that :)
Try to do
pip uninstall empyrial
and
pip install empyrial
It'd install the new version and it should work. Keep me posted!
Thanks for the help.
Unfortunately this error now appears.
~\Anaconda3\lib\site-packages\empyrial.py in fundlens(my_portfolio, period) 588 589 try: --> 590 controversy = ticker.sustainability.iloc[:,0]['highestControversy'] 591 except TypeError: 592 controversy = "None"
AttributeError: 'NoneType' object has no attribute 'iloc'
Again this is my mistake 💀
Try to reinstall it now, hopefully, this should work. If you still get an error can you show me the tickers you try to pass through the fundlens, please?
It'll help me to copy your code and see where the problem is.
Have a good day =)
Hi,
Works great. Thanks for the help.
Anaconda3\lib\site-packages\empyrial.py", line 610, in fundlens ['Dividend yield', yahoo_financials.get_dividend_yield()], ['Payout ratio', yahoo_financials.get_payout_ratio()], ['Controversy', controversy], ['Social score', social_score],
UnboundLocalError: local variable 'controversy' referenced before assignment