dpguthrie / dpguthrie/yahooquery

KeyError 'currencyCode' in get_financial_data()

Open
#271 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
920
Forks
164
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
`get_financial_data()` is crashing

**To Reproduce**
Steps to reproduce the behavior:
```python
import yahooquery as yq

aapl = yq.Ticker('aapl')
aapl.get_financial_data(
frequency='a',
types=['PeRatio', 'PegRatio', 'PsRatio', 'PbRatio']
)
```

**Expected behavior**
I expect the function to return a pandas Dataframe with those values

**Screenshots**
```text
File c:\Users\xxx\miniconda3\envs\py311\Lib\site-packages\pandas\core\groupby\grouper.py:1043, in get_grouper(obj, key, axis, level, sort, observed, validate, dropna)
1041 in_axis, level, gpr = False, gpr, None
1042 else:
-> 1043 raise KeyError(gpr)
1044 elif isinstance(gpr, Grouper) and gpr.key is not None:
1045 # Add key to exclusions
1046 exclusions.add(gpr.key)

KeyError: 'currencyCode'
```

**Desktop (please complete the following information):**
- Win11 Pro
- Python 3.12

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.