manusimidt / py-xbrl

Python-based parser for parsing XBRL and iXBRL files
https://py-xbrl.readthedocs.io/en/latest/
GNU General Public License v3.0
100 stars 37 forks source link

Elements missing after parsing #126

Closed BenGraWarBuf closed 4 months ago

BenGraWarBuf commented 4 months ago

for example in the following instance file: https://www.sec.gov/Archives/edgar/data/101199/000010119921000053/ufcs-20210331_htm.xml the element:

92401000 is missing after parsing this is the index page for reference: https://www.sec.gov/Archives/edgar/data/101199/000010119921000053/0000101199-21-000053-index.htm is not clear to me why the namespace ufcs is not being picked up. any idea why this could be?
manusimidt commented 4 months ago

This is a funny one! Thanks for posting! I really wonder why this has not been discovered before 😄

Background: When parsing facts in XBRL I loop over all XML elements. In order to exclude XBRL contexts, units and schema references I have the following if condition there: image

Since the company filing the document is called "unitedfiregroup" it has the phrase "unit" in the full XML tag and thus py-xbrl skips all facts filed by this company because it thinks that these facts are units and not facts.

manusimidt commented 4 months ago

@BenGraWarBuf should be fixed in V 2.2.11 :)

BenGraWarBuf commented 4 months ago

Wow! your are a Rockstar my friend that was lightning fast.