Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 name space errors #63

Closed
mrx23dot opened this issue Aug 17, 2021 · 4 comments
Closed

2 name space errors #63

mrx23dot opened this issue Aug 17, 2021 · 4 comments

Comments

@mrx23dot
Copy link
Contributor

mrx23dot commented Aug 17, 2021

For these two:
https://www.sec.gov/Archives/edgar/data/0001686850/000121390021042028/f10q0621_motusgihold.htm
https://www.sec.gov/Archives/edgar/data/0001553643/000121390021017556/f10k2020_relmadatherapeutic.htm

I get:

Traceback (most recent call last):
    inst = XbrlParser(cache).parse_instance(url)
  File "C:\python36\lib\site-packages\xbrl\instance.py", line 653, in parse_instance
    return parse_ixbrl_url(url, self.cache)
  File "C:\python36\lib\site-packages\xbrl\instance.py", line 363, in parse_ixbrl_url
    return parse_ixbrl(instance_path, cache, instance_url)
  File "C:\python36\lib\site-packages\xbrl\instance.py", line 406, in parse_ixbrl
    context_dir = _parse_context_elements(xbrl_resources.findall('xbrli:context', NAME_SPACES), ns_map, taxonomy, cache)
  File "C:\python36\lib\site-packages\xbrl\instance.py", line 574, in _parse_context_elements
    member_tax = _load_common_taxonomy(cache, ns_map[member_prefix], taxonomy)
  File "C:\python36\lib\site-packages\xbrl\instance.py", line 630, in _load_common_taxonomy
    if tax is None: raise TaxonomyNotFound(namespace)
xbrl.TaxonomyNotFound: The taxonomy with namespace http://xbrl.sec.gov/stpr/2021 could not be found. Please check if it is imported in the schema file

Maybe it's missing www?

Is it a filling or a lib issue ?

Cheers

@manusimidt
Copy link
Owner

The taxonomy (STPR 2021) that the parser can not find is in draft and not officially released.
See https://www.sec.gov/structureddata/osddrafttaxonomyfiles
I am not quite sure why these two submissions use this taxonomy, however I will add it to the mapping :)

@mrx23dot
Copy link
Contributor Author

Why doesn't the recursion include base taxonomy downloads?
The lib already knows what's missing, so we wouldn't need to hardcode the new docs every year.

@manusimidt
Copy link
Owner

The libary does indeed automatically download and parse all taxonomies that are imported in the respective taxonomy schema files.
However some filers (expecially from the US) do not import the taxonomies.

They declare the namespace:

<xbrli:xbrl xmlns:dei="http://xbrl.sec.gov/dei/2020-01-31">...</xbrli:xbrl>

but the following schema import is missing:

<xs:import 
  namespace="http://xbrl.sec.gov/dei/2020-01-31" 
  schemaLocation="https://xbrl.sec.gov/dei/2020/dei-2020-01-31.xsd"/>

Using a namespace without declaring the schema url for the taxonomy behind the namespace is bad practice. But the SEC tolerates this for the following standard taxonomies:
https://www.sec.gov/info/edgar/edgartaxonomies.shtml

Therefore the mapping is used in case the filing lacks the appropriate mapping between namespace and schema url.

@mrx23dot
Copy link
Contributor Author

mrx23dot commented Sep 1, 2021

When we extract the imports cannot we just try to add the declared namespaces too?
(at least the ones that look like URL) Just make it universal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants