Open LcMaculan opened 6 years ago
This used to work up until some days ago. It looks like there was some change on Morningstar's side and wherever there is a hyphen indicating a blank value in a financial statement, the data frame ends up having the word 'false' there instead.
You can fix it by adding:
output_frame.replace('false', 'NaN', regex=True, inplace=True)
at the end of the _process_frame
method, above the return
statement.
It looks like it started working again, but perhaps it's worth adding that extra line in the method just in case there is some change in the future.
Perfect, thank you vary much.
Getting different error with same run code:
kr = gm.KeyRatiosDownloader()
kr_frames = kr.download('AAPL')
print(kr_frames)
returns
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Users\OPPENE\AppData\Local\JetBrains\Toolbox\apps\PyCharm-C\ch-0\182.3911.33\helpers\pydev\_pydev_bundle\pydev_umd.py", line 194, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Users\OPPENE\AppData\Local\JetBrains\Toolbox\apps\PyCharm-C\ch-0\182.3911.33\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/OPPENE/PyCharm/Projects/FinanceValuation/pullData.py", line 115, in <module>
kr_frames = kr.download('AAPL')
File "C:\Users\OPPENE\PyCharm\Projects\FinanceValuation\good_morning\good_morning.py", line 91, in download
raise ValueError("MorningStar cannot find the ticker symbol "
ValueError: MorningStar cannot find the ticker symbol you entered or it is INVALID. Please try again.
Getting different error with same run code:
kr = gm.KeyRatiosDownloader() kr_frames = kr.download('AAPL') print(kr_frames)
returns
Traceback (most recent call last): File "<input>", line 1, in <module> File "C:\Users\OPPENE\AppData\Local\JetBrains\Toolbox\apps\PyCharm-C\ch-0\182.3911.33\helpers\pydev\_pydev_bundle\pydev_umd.py", line 194, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "C:\Users\OPPENE\AppData\Local\JetBrains\Toolbox\apps\PyCharm-C\ch-0\182.3911.33\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "C:/Users/OPPENE/PyCharm/Projects/FinanceValuation/pullData.py", line 115, in <module> kr_frames = kr.download('AAPL') File "C:\Users\OPPENE\PyCharm\Projects\FinanceValuation\good_morning\good_morning.py", line 91, in download raise ValueError("MorningStar cannot find the ticker symbol " ValueError: MorningStar cannot find the ticker symbol you entered or it is INVALID. Please try again.
Yes, it is. Have you found a method to solve this?
ya i am seeing the same issue
Hello, I'm trying to download KeyRatios in this way:
output is:
ValueError: could not convert string to float: 'false'
Some advice? Thanks