Skip to content

Commit

Permalink
Update fundamentals.py
Browse files Browse the repository at this point in the history
Error in supplying timescale values resulted in misleading ValueError - 

```
ValueError: Illegal argument: timescale must be one of: ['income', 'balance-sheet', 'cash-flow']
```
  • Loading branch information
akshayparopkari authored Jan 11, 2024
1 parent acbd2a8 commit c5404bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yfinance/scrapers/fundamentals.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _fetch_time_series(self, name, timescale, proxy=None):
if name not in allowed_names:
raise ValueError(f"Illegal argument: name must be one of: {allowed_names}")
if timescale not in allowed_timescales:
raise ValueError(f"Illegal argument: timescale must be one of: {allowed_names}")
raise ValueError(f"Illegal argument: timescale must be one of: {allowed_timescales}")

try:
statement = self._create_financials_table(name, timescale, proxy)
Expand Down

0 comments on commit c5404bc

Please sign in to comment.