Another Notes item - this time a crash inside edgartools
Issue Type
- [ ] Data Quality Issue (incorrect financial values, missing data)
- [ X] XBRL Parsing Issue (statement rendering, concept mapping)
- [ ] Filing Access Issue (download failures, attachment problems)
- [ ] Performance Issue (slow operations, memory problems)
- [ ] Compatibility Issue (platform/dependency conflicts)
- [ ] Documentation Issue (unclear instructions, missing examples)
Environment
EdgarTools Version: 6.0.0 Python Version: 3.15 Operating System: macos
Bug Description
Diagnosis from AI: The error is not in your code — it happens inside edgartools (edgar/xbrl/statements.py:1809, in Note._apply_presentation), which is called from get_notes() when it runs note.to_dataframe(). What's happening: One of KEYS' note tables has a cell containing an empty list [] in a column whose dtype is float64. When edgartools applies presentation sign correction (result.loc[mask, col] = numeric_col[mask] * ...), pandas 3.x refuses to assign a non-numeric value into a numeric block and raises TypeError: Invalid value '[]' for dtype 'float64'.
What actually happened: A clear description of what went wrong.
Error message (if any):
Paste any error messages here
Reproduction
Company/Ticker: KEYS Time Period: 2019 Relevant Forms: 10-K
Minimal code to reproduce:
# Paste the minimal code that reproduces the issue
from edgar import Company
company = Company("AAPL")
# ... rest of reproduction code
Additional Context
Add any other context about the problem here. Screenshots, related issues, etc.
This issue will be handled using EdgarTools' systematic issue resolution workflow. A reproduction test will be created to verify the fix.
Thanks, this one was real, and it isn't specific to your code. The crash comes from Keysight's FY2020 10-K, not 2019. That filing includes a land-sale details table with two line items and no values at all (SEC doesn't even show it). With no sign information to apply, to_dataframe() handed pandas 3 an empty column of the wrong type, and pandas refused it. The [] in the error is that empty column, not a list in the data. Fixed in #1973, so walking the notes no longer crashes, and the values on statements that do carry signs are unchanged. It'll be in the next release.