Skip to content

facts.get_fact() call returns None #618

@djleblan754

Description

@djleblan754

Issue Type

  • [ x ] Data Quality Issue (incorrect financial values, missing data)
  • 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: (e.g., 4.9.0)
5.11.2
Python Version: (e.g., 3.10.5)
3.11.13
Operating System: (e.g., macOS 14.0, Windows 11, Ubuntu 22.04)
Ubuntu 22.04.5 LTS

Bug Description

What you expected to happen:
I expected the call to return the requested data.

What actually happened:
The call returned None.

Error message (if any):

Paste any error messages here

Reproduction

Company/Ticker: (e.g., AAPL)
Time Period: (e.g., 2020-2023, Q4 2023)
Relevant Forms: (e.g., 10-K, 10-Q, 8-K)

Minimal code to reproduce:

# From 'After' example here: https://edgartools.readthedocs.io/en/latest/PeriodType-Quick-Reference/?h=facts.get_fact%28#from-boolean-annual-parameter

# Rich period support with enhanced querying
from edgar import Company

company = Company("AAPL")

facts = company.get_facts()
print(f"{type(facts)=}")  # --> <class 'edgar.entity.entity_facts.EntityFacts'>
print(f"{facts=}")  # --> ok

# Financial statement methods with boolean parameters
# annual_income = facts.income_statement(annual=True)     # Annual
# quarterly_income = facts.income_statement(annual=False) # Quarterly

# Advanced period filtering with query interface
# ttm_facts = facts.query().by_period_length(12).get()   # Trailing twelve months
# quarterly_facts = facts.query().by_period_length(3).get() # Quarterly periods

# Individual fact retrieval with period specification
revenue_2023 = facts.get_fact("Revenue", period="2023-FY")
print(f"{type(revenue_2023)=}")  # --> <class 'NoneType'>
print(f"{revenue_2023=}")  # --> None

revenue_q4 = facts.get_fact("Revenue", period="2023-Q4")
print(f"{type(revenue_q4)=}")  # --> <class 'NoneType'>
print(f"{revenue_q4=}")  # --> None

Additional Context

My objective is to extract specific 'concepts' from the company facts along with their associated filing dates. These 'concepts' span the income statement, balance sheet and cash flow statements. Ironically, I believe that it may be easier if I could work directly with the company facts in JSON format - is it possible to do that?


This issue will be handled using EdgarTools' systematic issue resolution workflow. A reproduction test will be created to verify the fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions