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.