Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upgetQuote(ticker, what=what_metrics) throwing column error due to empty fields #208
Comments
@joshuaulrich you are correct Both these combinations don't throw errors for me either! However, you can still get the error with multiple tickers when they all have at least 1 missing field like in the case of
as TSLA is missing two fields P/E Ratio & Dividend Yield fields, whilst AMZN is missing the Dividend Yield field. Edit: if you add AAPL to the query (has no missing fields) it doesn't throw the error
output TSLA | 2017-12-22 16:00:00 | Tesla, Inc. | NA | NA |
|
Thanks for the detailed report! This is certainly a bug, and I can replicate it. |
|
getQuote("SBIN.NS",what=yahooQF()) Error in
Matrix products: default locale: attached base packages: other attached packages: loaded via a namespace (and not attached): |
|
To add another example:
whereas Here is a diff between the json response from Yahoo of the two queries which shows significant differences in the keys of the response: https://gist.github.com/RobinL/e13df2ee55aa6c1117d5d6b6371e9b69/revisions |
Description
Error thrown because "Dividend Yield" is an empty field in AMZN ticker
Expected behavior
[return fields without the error]
Minimal, reproducible example
Session Info