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'])

13th Feb 2023, 12:20 PM
Solo-Rusty
Solo-Rusty - avatar
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.
14th Feb 2023, 4:51 PM
Lothar
Lothar - avatar
+ 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)
13th Feb 2023, 8:03 PM
Lothar
Lothar - avatar
+ 3
What is not working? It just takes me to "learn" section
13th Feb 2023, 12:47 PM
Lamron
Lamron - avatar
+ 1
i put the actual code in there
14th Feb 2023, 11:53 AM
Solo-Rusty
Solo-Rusty - avatar
+ 1
The error Traceback (most recent call last): File "file0.py", line 5, in <module> print(data.info['profitMargins']) KeyError: 'profitMargins'
14th Feb 2023, 11:54 AM
Solo-Rusty
Solo-Rusty - avatar
+ 1
Does it not work because it's outdated?
14th Feb 2023, 11:57 AM
Solo-Rusty
Solo-Rusty - avatar