Skip to content

RecursionError in EDGAR 26.1 on presentation structures with recursive arcs #60

@austinmatherne-wk

Description

@austinmatherne-wk

Hi @freddym56,

EDGAR 26.1 logs a traceback on a recursion error when processing filings that contain recursive presentation relationships (e.g. conceptA → conceptB → conceptA).

This appears to be related to this change: https://github.com/Arelle/EDGAR/pull/58/changes#diff-bbaebc86d60d6d979a2f02dbcfde880c4b2d7355d61d25c6b188dd323f02793eL113

To Reproduce

  1. Download: filing_documents.zip
  2. Run:
    python arelleCmdLine.py --plugin EDGAR --disclosureSystem efm-pragmatic --validate --file filing_documents.zip

Stack Trace

Exception in filing end processing, traceback: ['Traceback (most recent call last):
', '  File "/Users/austinmatherne/git/Arelle/arelle/plugin/EDGAR/render/__init__.py", line 1090, in filingEnd
    Filing.mainFun(self, report, self.reportsFolder, transform=reportXslt, rFilePrefix=rFilePrefix)  # dissem suffix
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
', '  File "/Users/austinmatherne/git/Arelle/arelle/plugin/EDGAR/render/Filing.py", line 43, in mainFun
    filing.cubeDriverBeforeFlowThroughSuppression(cube)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
', '  File "/Users/austinmatherne/git/Arelle/arelle/plugin/EDGAR/render/Filing.py", line 934, in cubeDriverBeforeFlowThroughSuppression
    cube.presentationGroup.startPreorderTraversal()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
', '  File "/Users/austinmatherne/git/Arelle/arelle/plugin/EDGAR/render/PresentationGroup.py", line 169, in startPreorderTraversal
    self.doPreorderTraversal(self.rootNodeList[0], giveMemGetPositionDictPrimary, {}, None, set(), visited, visitCounter, 0)
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
', '  File "/Users/austinmatherne/git/Arelle/arelle/plugin/EDGAR/render/PresentationGroup.py", line 258, in doPreorderTraversal
    self.doPreorderTraversal(childNode, giveMemGetPositionDictPrimary, {}, parentAxis, setOfConcepts, visited, visitCounter, depth)
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
', '  File "/Users/austinmatherne/git/Arelle/arelle/plugin/EDGAR/render/PresentationGroup.py", line 258, in doPreorderTraversal
    self.doPreorderTraversal(childNode, giveMemGetPositionDictPrimary, {}, parentAxis, setOfConcepts, visited, visitCounter, depth)
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
', '  File "/Users/austinmatherne/git/Arelle/arelle/plugin/EDGAR/render/PresentationGroup.py", line 258, in doPreorderTraversal
    self.doPreorderTraversal(childNode, giveMemGetPositionDictPrimary, {}, parentAxis, setOfConcepts, visited, visitCounter, depth)
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
', '  [Previous line repeated 981 more times]
', '  File "/Users/austinmatherne/git/Arelle/arelle/plugin/EDGAR/render/PresentationGroup.py", line 248, in doPreorderTraversal
    self.buildLabel(concept, preferredLabel)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
', '  File "/Users/austinmatherne/git/Arelle/arelle/plugin/EDGAR/render/PresentationGroup.py", line 283, in buildLabel
    labelStr = concept.label(preferredLabel=preferredLabel, fallbackToQname=False, lang=self.filing.controller.labelLangs)
', '  File "/Users/austinmatherne/git/Arelle/arelle/ModelDtsObject.py", line 640, in label
    label = labelsRelationshipSet.label(self, preferredLabel, _lang, linkroleHint=linkroleHint)
', '  File "/Users/austinmatherne/git/Arelle/arelle/ModelRelationshipSet.py", line 357, in label
    labels = self.fromModelObject(modelFrom)
', '  File "/Users/austinmatherne/git/Arelle/arelle/ModelRelationshipSet.py", line 254, in fromModelObject
    return self.loadModelRelationshipsFrom().get(modelFrom, [])
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
', 'RecursionError: maximum recursion depth exceeded
'] - IXDS test-20260321.htm

Environment

  • EDGAR plugin version: 26.1
  • Arelle: 2.39.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions