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

Date parsing fails #71

Closed mrx23dot closed 2 years ago

mrx23dot commented 2 years ago

https://www.sec.gov/Archives/edgar/data/0001580905/000119312519281533/d802337d10q.htm

ixbrl gives:

Traceback (most recent call last):
  File "xbrl_small_test.py", line 14, in <module>
    inst = XbrlParser(cache).parse_instance(url)
  File "py-xbrl_my\xbrl\instance.py", line 653, in parse_instance
    return parse_ixbrl_url(url, self.cache)
  File "py-xbrl_my\xbrl\instance.py", line 363, in parse_ixbrl_url
    return parse_ixbrl(instance_path, cache, instance_url)
  File "py-xbrl_my\xbrl\instance.py", line 426, in parse_ixbrl
    fact_value: str or float = _extract_ixbrl_value(fact_elem)
  File "py-xbrl_my\xbrl\instance.py", line 503, in _extract_ixbrl_value
    parsed_date = strptime(fact_elem.text, '%B %d')
  File "C:\python36\lib\_strptime.py", line 559, in _strptime_time
    tt = _strptime(data_string, format)[0]
  File "C:\python36\lib\_strptime.py", line 362, in _strptime
    (data_string, format))
ValueError: time data 'December-31' does not match format '%B %d'

index https://www.sec.gov/Archives/edgar/data/0001580905/000119312519281533/0001193125-19-281533-index.htm