Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running fundlens #19

Closed
jaredre opened this issue Jun 20, 2021 · 4 comments
Closed

Error when running fundlens #19

jaredre opened this issue Jun 20, 2021 · 4 comments

Comments

@jaredre
Copy link

jaredre commented Jun 20, 2021

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

@santoshlite
Copy link
Owner

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!

@jaredre
Copy link
Author

jaredre commented Jun 21, 2021

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'

@santoshlite
Copy link
Owner

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 =)

@jaredre
Copy link
Author

jaredre commented Jun 22, 2021

Hi,

Works great. Thanks for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants