kanedata / ixbrl-parse

A python library for getting useful data out of ixbrl files.
https://ixbrl-parse.readthedocs.io/
MIT License
63 stars 26 forks source link

NotImplementedError: Format "fixedzero" not implemented (namespace "ixt") #25

Closed thebruuu closed 1 year ago

thebruuu commented 2 years ago

Hello I tried to parse the following file -official file from Reanult Group" and got the following error

Traceback (most recent call last):
  File "C:\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Python39\lib\site-packages\ixbrlparse\__main__.py", line 73, in <module>
    main()
  File "C:\Python39\lib\site-packages\ixbrlparse\__main__.py", line 53, in main
    x = IXBRL(args.infile)
  File "C:\Python39\lib\site-packages\ixbrlparse\core.py", line 194, in __init__
    self.parser._get_numeric()
  File "C:\Python39\lib\site-packages\ixbrlparse\core.py", line 110, in _get_numeric
    self.numeric.append(ixbrlNumeric(element))
  File "C:\Python39\lib\site-packages\ixbrlparse\components\numeric.py", line 36, in __init__
    self.format = get_format(format_["format_"])(**format_)
  File "C:\Python39\lib\site-packages\ixbrlparse\components\transform.py", line 106, in get_format
    raise NotImplementedError(
NotImplementedError: Format "fixedzero" not implemented (namespace "ixt")

I used the command line

python -m ixbrlparse 969500F7JLTX36OUI695-2021-12-31.xhtml

the document is from this file RENAULT GROUP on this website https://www.renaultgroup.com/finance/information-reglementee/

drkane commented 2 years ago

Hi @thebruuu - thanks for reporting the issue. I've added support for the fixed-zero format, which is what was causing the issue. I've tested version 0.4.2 against the file and it seems to work -would be great if you could confirm it works for you.