Formula for required parameter is never calculated by Arelle

63 views
Skip to first unread message

Pavel Malafeev

unread,
Jan 26, 2018, 11:57:31 AM1/26/18
to Arelle-users
I'm trying to open attached instance in Arelle and getting error
[xbrlve:missingParameterValue] Parameter par:refPeriodEnd is required but not input - http://www.cbr.ru/xbrl/ext/params-rend.xml 7

It seems that the problem is caused by the function validate in module ValidateFormula.py. In first place this function checks "required" flag and immediately logs error if a value is not provided. Formula calculation is executed only after this check and thus only for optional parameters. So, formula for required parameter is never calculated and parameter is always empty.

I tried to bypass this error by providing value for the parameter using Tools>Formula>Parameters. 
I added parameter with QName = {http://parameters}refPeriodEnd, Type = date and Value = 2017-10-31.
I tried to open instance again and got exception in console:
Exception in thread Thread-3:
Traceback (most recent call last):
  File "C:\Python35\lib\threading.py", line 914, in _bootstrap_inner
    self.run()
  File "C:\Python35\lib\threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "C:\projects\Arelle\arelle\CntlrWinMain.py", line 807, in backgroundLoadXbrl
    RenderingEvaluator.init(modelXbrl)
  File "C:\projects\Arelle\arelle\RenderingEvaluator.py", line 54, in init
    ValidateFormula.validate(modelXbrl, xpathContext=modelXbrl.rendrCntx, parametersOnly=True, statusMsg=_("compiling rendering tables"))
  File "C:\projects\Arelle\arelle\ValidateFormula.py", line 393, in validate
    typeLocalName = paramDataType.localName if paramDataType else "string"
AttributeError: 'str' object has no attribute 'localName'


There is another exception in table rendering phase for this instance and taxonomy:

[arelle:resolutionException] Exception in resolution of definition node table:aspectNode: list index out of range - http://www.cbr.ru/xbrl/nso/purcb/rep/2017-12-31/tab/SR_0420417/SR_0420417-rend.xml 396
Traceback (most recent call last):
  File "C:\projects\Arelle\arelle\RenderingResolver.py", line 459, in expandDefinition
    checkLabelWidth(childStructuralNode, checkBoundFact=True)
  File "C:\projects\Arelle\arelle\RenderingResolver.py", line 241, in checkLabelWidth
    if widestWordLen > view.rowNonAbstractHdrSpanMin[structuralNode.depth]:
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\projects\Arelle\arelle\RenderingResolver.py", line 68, in resolveAxesStructure
    return resolveTableAxesStructure(view, table, tblAxisRelSet)
  File "C:\projects\Arelle\arelle\RenderingResolver.py", line 133, in resolveTableAxesStructure
    expandDefinition(view, yTopStructuralNode, definitionNode, definitionNode, 1, disposition, facts, i, tblAxisRels)
  File "C:\projects\Arelle\arelle\RenderingResolver.py", line 538, in expandDefinition
    raise ex.with_traceback(ex.__traceback__)  # provide original traceback information
  File "C:\projects\Arelle\arelle\RenderingResolver.py", line 341, in expandDefinition
    expandDefinition(view, childStructuralNode, breakdownNode, childDefinitionNode, depth+ordDepth, axisDisposition, facts, i, tblAxisRels) #recurse
  File "C:\projects\Arelle\arelle\RenderingResolver.py", line 547, in expandDefinition
    raise e.with_traceback(ex.__traceback__)  # provide original traceback information
  File "C:\projects\Arelle\arelle\RenderingResolver.py", line 459, in expandDefinition
    checkLabelWidth(childStructuralNode, checkBoundFact=True)
  File "C:\projects\Arelle\arelle\RenderingResolver.py", line 241, in checkLabelWidth
    if widestWordLen > view.rowNonAbstractHdrSpanMin[structuralNode.depth]:
arelle.RenderingResolver.ResolutionException: [arelle:resolutionException] exception Exception in resolution of definition node table:aspectNode: list index out of range

NSO_PURCB_0420417_2017-10-31.xbrl
arelle-parameters.png
Reply all
Reply to author
Forward
0 new messages