0
Why Does this not work?
https://www.sololearn.com/learning/1139/5133/13324/1 I would just like to know why this doesn't work. like is it because it is old? import yfinance as yf data = yf.Ticker("TSLA") print(data.info['profitMargins']) print(data.info['returnOnEquity'])
6 ответов
+ 8
Solo-Rusty
there is an issue with the yfinance module. the problem occurs when running the original code from the exercice (given by sololearn).
> please send a message to the sololearn admins.
+ 11
Solo-Rusty ,
your questiom seems to be incomplete. the post should include:
> a clear task description with input / output sample (your link does not work for me)
> a link that points to your code try
> a description what exactly your issue is, (if possible including an error message)
+ 3
What is not working? It just takes me to "learn" section
+ 1
i put the actual code in there
+ 1
The error
Traceback (most recent call last):
File "file0.py", line 5, in <module>
print(data.info['profitMargins'])
KeyError: 'profitMargins'
+ 1
Does it not work because it's outdated?