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

Fails to parse xml #60

Closed mrx23dot closed 3 years ago

mrx23dot commented 3 years ago

Trying to parse: https://www.sec.gov/Archives/edgar/data/104169/000010416914000019/wmt-20140131_cal.xml

gives: Exception has occurred: AttributeError 'NoneType' object has no attribute 'attrib'

for inst = XbrlParser(cache).parse_instance(url)

trace: inst = XbrlParser(cache).parse_instance(url) File "C:\python36\lib\site-packages\xbrl\instance.py", line 652, in parse_instance return parse_xbrl_url(url, self.cache) File "C:\python36\lib\site-packages\xbrl\instance.py", line 277, in parse_xbrl_url return parse_xbrl(instance_path, cache, instance_url) File "C:\python36\lib\site-packages\xbrl\instance.py", line 293, in parse_xbrl schema_uri: str = schema_ref.attrib[XLINK_NS + 'href']

mrx23dot commented 3 years ago

Sorry, wrong document, it wasn't the instance xml.