dpguthrie / dpguthrie/yahooquery

ValueError: year is out of range

Open
#342 0 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**
File "venv/lib/python3.12/site-packages/yahooquery/ticker.py", line 211, in asset_profile
return self._quote_summary(["assetProfile"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "venv/lib/python3.12/site-packages/yahooquery/ticker.py", line 109, in _quote_summary
return data if self.formatted else self._format_data(data, dates)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "venv/lib/python3.12/site-packages/yahooquery/base.py", line 165, in _format_data
obj[k] = self._format_data(v, dates)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "venv/lib/python3.12/site-packages/yahooquery/base.py", line 156, in _format_data
obj[k] = datetime.fromtimestamp(v).strftime("%Y-%m-%d %H:%M:%S")
^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: year 20185 is out of range

**To Reproduce**
import yahooquery as yq
ticker = "CONCORD.BO"
stock = yq.Ticker(ticker)
stock.asset_profile

**Expected behavior**
No error.

**Desktop (please complete the following information):**
- OS: Linux Mint 22.3
- Browser: Chrome
- Python: 3.12.3
- Packages:
numpy==2.4.6
pandas==3.0.3
yahooquery==2.4.1

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.