Traceback (most recent call last):
File "", line 1, in
File "/opt/homebrew/lib/python3.11/site-packages/edgar/company_reports.py", line 56, in financials
return Financials.from_xbrl(xbrl)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/edgar/financials.py", line 301, in from_xbrl
balance_sheet = BalanceSheet(xbrl.facts)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/edgar/financials.py", line 174, in init
super().init(facts, end_date)
File "/opt/homebrew/lib/python3.11/site-packages/edgar/financials.py", line 66, in init
self.end_date: str = end_date or self.facts.period_end_date
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/edgar/_xbrl.py", line 126, in period_end_date
return self.get_dei('DocumentPeriodEndDate')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/edgar/_xbrl.py", line 122, in get_dei
return res.value.item()
^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/pandas/core/base.py", line 418, in item
raise ValueError("can only convert an array of size 1 to a Python scalar")
ValueError: can only convert an array of size 1 to a Python scalar
When trying to get the data from the income statement in the latest 10-K form from AMD, I am getting an error. I am using the following commands:
Traceback (most recent call last): File "", line 1, in
File "/opt/homebrew/lib/python3.11/site-packages/edgar/company_reports.py", line 56, in financials
return Financials.from_xbrl(xbrl)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/edgar/financials.py", line 301, in from_xbrl
balance_sheet = BalanceSheet(xbrl.facts)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/edgar/financials.py", line 174, in init
super().init(facts, end_date)
File "/opt/homebrew/lib/python3.11/site-packages/edgar/financials.py", line 66, in init
self.end_date: str = end_date or self.facts.period_end_date
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/edgar/_xbrl.py", line 126, in period_end_date
return self.get_dei('DocumentPeriodEndDate')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/edgar/_xbrl.py", line 122, in get_dei
return res.value.item()
^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/pandas/core/base.py", line 418, in item
raise ValueError("can only convert an array of size 1 to a Python scalar")
ValueError: can only convert an array of size 1 to a Python scalar