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

failed in retrieving data of multiple symbols with Ticker class #213

Open
kindpeter opened this issue Jul 30, 2023 · 0 comments
Open

failed in retrieving data of multiple symbols with Ticker class #213

kindpeter opened this issue Jul 30, 2023 · 0 comments

Comments

@kindpeter
Copy link

When the Ticker class is used to get the data of multiple symbols, if one or some of the symbols do not have complete data in the yahoo finance website or some other reasons, an error occurs. Here is the sample code:
import yahooquery as yq
tickers = yq.Ticker(['AAPL', 'AASL', 'AAACX', 'AAMBAX', 'MSFT'], asynchronous=True)
summary = tickers.summary_detail

When running these three lines of code, an error popped up as following:
Traceback (most recent call last):
File "F:\Users\Huajiang\My Code & Modeling\Python\venvs\iTrade\Lib\site-packages\yahooquery\base.py", line 1217, in _construct_data
data = json[response_field]["result"][0][addl_key]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'summaryDetail'

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

1 participant