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
111 stars 40 forks source link

DEI Taxonomy not found #9

Closed schmiJo closed 3 years ago

schmiJo commented 3 years ago

Yes the DEI Taxonomy is not imported in the Taxonomy Extension by this particular filer. But it is a standard taxonomy that should be covered by

https://github.com/manusimidt/xbrl_parser/blob/9a5e0232c568226f9b9251908ea482803d39c29f/xbrl_parser/taxonomy.py#L147-L156

Traceback (most recent call last):
  File "E:/Programming/python/xbrl_parser/workdir/test_parser.py", line 11, in <module>
    inst: XbrlInstance = parse_xbrl_url(instance_url, cache)
  File "E:\Programming\python\xbrl_parser\xbrl_parser\instance.py", line 256, in parse_xbrl_url
    return parse_xbrl(instance_path, cache, instance_url)
  File "E:\Programming\python\xbrl_parser\xbrl_parser\instance.py", line 282, in parse_xbrl
    context_dir = _parse_context_elements(root.findall('xbrli:context', NAME_SPACES), root.attrib['ns_map'], taxonomy)
  File "E:\Programming\python\xbrl_parser\xbrl_parser\instance.py", line 519, in _parse_context_elements
    if dimension_tax is None: raise TaxonomyNotFound(ns_map[dimension_prefix])
xbrl_parser.TaxonomyNotFound: The taxonomy with namespace http://xbrl.sec.gov/dei/2011-01-31 could not be found. Please check if it is imported in the schema file
manusimidt commented 3 years ago

image

This is because some (actually very few) submissions contain multiple schemaRefs to multiple taxonomies instead of relying on just one (extension-) taxonomy. Must see how we can cover this with the current object structure...

manusimidt commented 3 years ago

This was resolved in #28