Maximum recursion depth exceeded

125 views
Skip to first unread message

Gallus Anonimus

unread,
Jun 9, 2016, 4:07:06 AM6/9/16
to Arelle-users
Hi,
For some polish XBRL taxonomies during validation I get
"Instance validation exception: maximum recursion depth exceeded".
I can provide full example (taxonomy + instance) if needed.
Stack is:
Validate.py", line 90, in validate
ValidateXbrl.py", line 501, in validate
ValidateFormula.py", line 415, in validate
ModelFormulaObject.py", line 511, in compile
ModelFormulaObject.py", line 199, in compile
ModelFormulaObject.py", line 831, in compile
XPathParser.py", line 715, in parse
pyparsing/pyparsing_py3.py", line 1090, in parseString
pyparsing/pyparsing_py3.py", line 1021, in _parseCache
pyparsing/pyparsing_py3.py", line 964, in _parseNoCache
pyparsing/pyparsing_py3.py", line 2326, in parseImpl
I understand that it is a problem with 3rd party lib.

I see the same problem reported here - https://arelle.atlassian.net/browse/ARELLE-155.
It seems that I have no permission to comment on this issue so I write here.

I was able to walkaround it by writing a plugin that sets recursion limit to higher value, like:
import os, io, sys

def validateSetup2(a,b):
    sys.setrecursionlimit(1500)

__pluginInfo__ = {
    'name': 'Zmiana limitu rekursji',
    'version': '1.0',
    'description': "TBD",
    'license': 'Apache-2',
    'author': 'JW',
    'copyright': 'JW',
    # classes of mount points (required)
    'Validate.XBRL.Start': validateSetup2,
}
So it may be also helpful to other people.

But now I have to handle taxonomy for which 1500 limit is still too small and it seems that I cannot increase it further because then Python crashes - I read here: http://stackoverflow.com/questions/2917210/python-what-is-the-hard-recursion-limit-for-linux-mac-and-windows that it could be increased when another setting is increased (stack_size), but it affects only new threads - so my question is does anybody have idea how to do it with Arelle (I don't have much experience with Python)?

Regards,
Jarek.

Jean-Paul Daisomont

unread,
Jun 10, 2016, 7:50:52 AM6/10/16
to Arelle-users
hello Jarek,

I test https://arelle.atlassian.net/browse/ARELLE-155. with the Arelle current version (Windows 64bits). It seems that this problem was solved in the meantime.

Could you provide full example (taxonomy + instance) to reproduce the issue?

Kind regards,

Jean-Paul

Gallus Anonimus

unread,
Jun 10, 2016, 9:02:48 AM6/10/16
to Arelle-users
Hi,
I'am using Arelle 2016-03-08 on 64Bit Windows 7, with 16Gb RAM.
When I validate using GUI it breaks quietly - output shows "validated in 25,59 secs" - in status bar I still have 'compiling formulae', but no CPU usage,
moreover when I use "Copy to clipboard" and paste it somewhere I can see the "maximum recursion depth exceeded" with stacktrace (so it seems that also logging errors is not working properly).
When I use Arelle from commandline:
C:\wosjar1\prog\Arelle9_20160308\arelleCmdLine -f c:\temp\_finrepeba\walidacja\f_1.1.3\tax\skonsolidowane\1.1.3\finrepeba_r.xml -v  --formulaParamExprResult --formulaParamInputValue --formulaVarSetExprEval --formulaVarSetExprResult --formulaAsserResultCounts --formulaSatisfiedAsser --formulaUnsatisfiedAsser --formulaUnsatisfiedAsserError --formulaFormulaRules --formulaVarExpressionEvaluation --formulaVarExpressionResult --formulaVarFiltersResult
the error is clearly shown on console.

Plase find attached _finrepeba.zip with polish FinrepEba taxonomy and test instance - after unpacking in c:\temp you can use the command above to reproduce error.
I can also provide my Arelle internet cache if needed.

Regards,
Jarek Wosik.
_finrepeba.zip

Gallus Anonimus

unread,
Jun 20, 2016, 5:58:14 AM6/20/16
to Arelle-users
Same problems occur with Arelle 2016-06-16.
Reply all
Reply to author
Forward
0 new messages