Arelle
raw JSON → 2.39.10 verified Mon Apr 27 auth: no python
Arelle is an open-source XBRL platform for creating, validating, and analyzing XBRL, iXBRL, and other financial reporting standards. Current version is 2.39.10, released regularly with updates for taxonomy support and bug fixes.
pip install arelle-release Common errors
error ModuleNotFoundError: No module named 'arelle' ↓
cause Arelle not installed or installed under different package name 'arelle-release'.
fix
Run 'pip install arelle-release' instead of 'pip install arelle'.
error ImportError: cannot import name 'main' from 'arelle.CntlrCmdLine' ↓
cause Old import path no longer valid in newer versions of arelle.
fix
Use 'from arelle import Arelle' and then 'Arelle.main(options)'.
error AttributeError: 'NoneType' object has no attribute 'validate' ↓
cause Arelle instance not created because options dict missing required keys like 'logFile' or 'plugins'.
fix
Ensure options dict includes at minimum 'logFile': '-' and 'plugins': [].
Warnings
breaking Arelle 2.30+ changed the import structure: 'from arelle import Arelle' instead of 'from arelle.CntlrCmdLine import main'. ↓
fix Update imports to use the new top-level module: 'from arelle import Arelle' and call Arelle.main().
gotcha Arelle's default log output goes to stderr; use 'logFile': '-' to redirect to stdout or a file path. ↓
fix Set 'logFile' option to '-' for stdout or '/path/to/log.txt' for a file.
deprecated The 'validate' argument in Arelle.main is deprecated; use the 'validate' option in the options dict instead. ↓
fix Pass 'validate' as a key in the options dictionary (e.g., options['validate'] = True).
Imports
- Arelle
from arelle import Arelle - ModelDocument wrong
from arelle.model import Documentcorrectfrom arelle import ModelDocument
Quickstart
import os
from arelle import Arelle
# Set up Arelle with minimal options
options = {
'logFile': '-', # stdout
'logLevel': 'INFO',
'plugins': [],
'validate': True,
'packages': []
}
# Arelle will validate if validation called further
print("Arelle imported successfully")
# Example: validate an XBRL instance (commented out)
# options['entrypoint'] = os.environ.get('XBRL_FILE', 'instance.xbrl')
# result = Arelle.main(options)