Xule validation error with the latest Arelle

169 views
Skip to first unread message

Sriram S

unread,
Sep 5, 2024, 3:52:18 AM9/5/24
to Arelle-users
Hi Team,

Testing with the Arelle webserver with the below versions:
Arelle - 2.30.27
Xule - 3.0.30024

Starting the Arelle WebServer from the menu shortcut with the below request
localhost:8080/rest/xbrl/validation?media=xml&utr&plugins=validate/DQC|transforms/SEC|EdgarRenderer&efm-pragmatic

I get the below error as a response, (not able to paste the image here for some reason):

Bottle v0.13-dev server starting up (using WSGIRefServer())...
Listening on http://localhost:8080/
Hit Ctrl-C to quit.

Traceback (most recent call last):
  File "D:\a\Arelle\Arelle\arelle\webserver\bottle.py", line 1001, in _handle
  File "D:\a\Arelle\Arelle\arelle\webserver\bottle.py", line 2017, in wrapper
  File "D:\a\Arelle\Arelle\arelle\CntlrWebMain.py", line 354, in validation
  File "D:\a\Arelle\Arelle\arelle\CntlrWebMain.py", line 385, in runOptionsAndGetResult
  File "D:\a\Arelle\Arelle\arelle\CntlrCmdLine.py", line 953, in run
  File "C:\Program Files\Arelle\plugin\xule\__init__.py", line 711, in xuleCmdUtilityRun
    if getattr(options, 'xule_max_excel_files') < 1:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'NoneType' and 'int'
127.0.0.1 - - [05/Sep/2024 13:07:26] "POST /rest/xbrl/validation?media=xml&utr&plugins=validate/DQC|transforms/SEC|EdgarRenderer&efm-pragmatic HTTP/1.1" 500 857  

From the error, it seems the condition with '<' or '>' throws error in the init.py file.

Please review and let us know to overcome this error to continue the dqc validation. 

Thanks in advance,
Sriram

Austin Matherne

unread,
Sep 5, 2024, 5:04:52 PM9/5/24
to Arelle-users
Hi Sriram,

We just released a fix to address a bug related to loading plugins from the web server in Arelle. This issue should be resolved with version 2.30.30. Can you test the new version and confirm if it's resolved for you?

Thanks for reporting,
Austin Matherne

Sriram S

unread,
Sep 9, 2024, 2:59:50 AM9/9/24
to Arelle-users
Hi Austin,

Thanks for the response and fix with the latest version. I'm able to see the dqc validation now. However, still get the below error because of the attribute 'semantic_hash_string'

<entry code="AttributeError" level="critical">
        <message>2024-09-09 12:05:58,823 [AttributeError] [Exception] Failed to complete request:
'RuntimeOptions' object has no attribute 'semantic_hash_string'
['  File &quot;D:\\a\\Arelle\\Arelle\\arelle\\CntlrCmdLine.py&quot;, line 1172, in run\n', '  File &quot;C:\\Program Files\\Arelle\\plugin\\semanticHash.py&quot;, line 60, in semanticHashRun\n    if getattr(options, &quot;semantic_hash&quot;, False) or getattr(options, &quot;semantic_hash_string&quot;) is not None:\n
                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n'] -
        </message>
</entry>

Please review and let us know your suggestions.
Sriram

Austin Matherne

unread,
Sep 9, 2024, 8:19:58 AM9/9/24
to Arelle-users
This appears to be a bug in the semanticHash plugin (maintained by XBRL US as part of the XULE plugins). I reported the bug here.

Sriram S

unread,
Sep 9, 2024, 8:55:50 AM9/9/24
to Arelle-users
Thanks for reporting it and creating an issue for this. I will follow-up on this issue and integrate once it's done.

Thanks again Austin for your prompt response and support, as always. Have a nice day !!!

Sriram

David Tauriello

unread,
Oct 24, 2024, 6:33:11 AM10/24/24
to Arelle-users
Hi Sriram - the latest version of XULE was released this week and should address this issue.

Sincerely,
David

Sriram S

unread,
Nov 7, 2024, 12:25:06 AM11/7/24
to Arelle-users
Thanks David for your follow-up and fix for the request. Thanks Austin for raising a query on the right channel to get this done. 

Regards,
Sriram

vahid dehghan

unread,
Jun 3, 2025, 4:57:08 AMJun 3
to Arelle-users
hi team and specially hi to dear austin

and xule 3.0  

after clonning arelle source and getting xule source in folder of plugin that arelle has directly, and some changes, i run belove instruction, befor running this instruction i create simple file with simple code inside it:

ruleset.xule:

rule Oops
scope instance
expression some_invalid_variable


D:\Source_Projects\Arelle>python arelle\CntlrCmdLine.py --plugins xule --xule-rule-set D:\Source_Projects\Arelle\vahidtest\ruleset.xule  --file C:\1404_03_04\1404_03_04\1404_03_04\sample.xbrl

[info] Activation of plug-in XBRL rule processor (xule) successful, version Check version using Tools->Xule->Version on the GUI or --xule-version on the command line. - xule
[info] Xule version: 3.0.30049 -
[info] loaded in 1.26 secs at 2025-06-03T11:54:14 - C:\1404_03_04\1404_03_04\1404_03_04\sample.xbrl


can any one help me! i dont see any effect of reading or applying ruleset.xule file !

David Tauriello

unread,
Jun 3, 2025, 7:32:01 AMJun 3
to Arelle-users
Hi Sriram - XULE runs as a compiled .zip. You can create and run your expression by including the following parameters:

!arelleCmdLine -f "THE REPORT TO USE WITH XULE" --plugins "xule" --xule-compile "LOCATION OF THE XULE FILE OR FOLDER TO COMPILE" --xule-run --xule-rule-set "LOCATION OF THE COMPILED .ZIP TO USE"

 Here's a very simple XULE expression you can run in a Jupyter notebook from a web browser: https://colab.research.google.com/github/xbrlus/xule/blob/jupyter/sample-colab.ipynb  

There are a couple of free training modules in the related resources section of https://xbrl.us/xule that might be of interest.

vahid dehghan

unread,
Jun 9, 2025, 8:25:38 AMJun 9
to Arelle-users

Issues Accessing Concept Names, Dimensions, and Members in Xule/Arelle with XBRL 3.0 Rule Syntax

Hi everyone,

I am working with the latest Arelle and Xule plugin versions to validate some real-world XBRL instances using the new XBRL Rules Syntax (Rule 3 / XBRL Query and Rules Language 1.0 PWD).
However, I’m running into several issues and inconsistencies:

  • I can only extract the raw values (fact numbers) from my instance documents; I cannot access concept names, dimensions, or members using the new Rule 3 syntax (e.g., @concept, @dimension, @member, @qname, etc.).

  • Attempts to use the official syntax described in the specification (https://www.xbrl.org/Specification/xbrl-rules-3.0/PWD-2024-06-11/xbrl-rules-3.0-PWD-2024-06-11.html) result in errors like:

    • 'value' is not a valid property

    • Concept dimension not found

    • Concept segment not found

    • qname not found or similar

  • Even with namespace declarations, explicit member/aspect access, or syntax from the latest XBRL Rule 3 and XBRL Query and Rules Language 1.0 documentation, the rules only seem to work with numbers—not with concept or dimension identifiers.

  • Many working Rule 3 examples on xbrl.us or in their PDF guide do not run in my environment (Arelle + Xule) but might work in the online Xule Playground.

  • When I output all facts with output { @ } or similar, I only see the numeric values without any mapping to their concept or context, making automated validation impossible.

  • My XBRL instance includes proper namespaces and taxonomy imports. Xule is installed and loaded correctly, and I can see values for all facts, but cannot access their identifiers or dimensions by rule.

Example of attempted rule:

xule
CopyEdit
namespace cbi-iras = "http://www.cbi.ir/xbrl/cbi-full/cbi-iras"; output SumInstallments { sum({ @concept = cbi-iras:InstallmentSaleExtendedToNonGovernmentalEntities @dimension = cbi-iras:ClassesOfCreditFacilitiesToAndReceivablesDueFromNonGovernmentalEntitiesAxis @member in list( cbi-iras:CurrentMember, cbi-iras:PastDueMember, cbi-iras:DeferredMember, cbi-iras:DoubtfulMember ) }.value) }

Result/Error:

pgsql
CopyEdit
[xule:error] rule SumInstallments: Rule: SumInstallments - Error while processing factset aspect. Concept dimension not found.

What am I missing?

  • Is the latest Rule 3/XBRL QRL syntax simply not implemented in the current Xule/Arelle releases?

  • Is there a workaround for getting concept, dimension, and member identifiers in Xule rules, or is manual mapping/parsing from the XBRL XML the only option?

  • Has anyone gotten Rule 3/XBRL QRL syntax to work for concept/dimension/member queries in Arelle/Xule, and if so, can you provide a working example?

Any guidance or clarification is greatly appreciated!

David Tauriello

unread,
Jun 10, 2025, 6:04:15 AMJun 10
to arelle...@googlegroups.com

Hi Vahid – There are a couple of free training modules in the related resources section of https://xbrl.us/xule that might be of interest.

 

The XULE expression {@} simply evaluates all facts in a report. With no other instructions, the output of the rule will be just that – every XBRL fact value from the report.  If you include the message function of XULE in the file, it can include attributes of facts returned by the rule.

 

Please update your output so plural @dimensions replaces singular @dimension as defined in the documentation and use set().sum to add the values returned by the expression (see 11.12.11 in the documentation – Set and list properties and functions). If you add a second expression and message to your XULE file, you can use the message component below the output expression like this:

message

"{$rule-value.concept.local-name} {$rule-value.period} {$rule-value} {$rule-value.unit} {$rule-value.dimensions}"

 

If those fixes to your expression don’t resolve the issues you’re experiencing, Here's are two very simple XULE expressions you can run in a Jupyter notebook from a web browser that might help with your work: https://colab.research.google.com/github/xbrlus/xule/blob/jupyter/sample-colab.ipynb

 

Except for the very first line in the second cell of the notebook, replace what’s in the XULE file in step 1 with what’s below so you can see two expressions run that

 

  1. list the dimension and members for the concept in the report and then
  2. sum the dimension by the periods in the report (the sums are ’aligned’ by period because the period is not in the expression).

 

If you define things like units and/or period as part of the expression, you can filter these results further.

 

/** add constants and namespaces below **/

namespace us-gaap = http://fasb.org/us-gaap/2022

namespace sj = http://www.scienjoyholdingcorp.com/20211231

constant $myconcept = us-gaap:FiniteLivedIntangibleAssetsGross

constant $mymember = sj:SoftwareMember

constant $mymember = us-gaap:TrademarksMember

 

/** modify rule below **/

output example

/** filtering a dimension by a concept - this will include dimension defaults, **/

/** otherwise use the same expression as sumsaligned **/

/** to get specific member values, add '=$mymember' or '=$mymember2' after Axis (no quotes) **/

{@us-gaap:FiniteLivedIntangibleAssetsByMajorClassAxis @concept= $myconcept}

message

"{$rule-value.concept.local-name} {$rule-value.period} {$rule-value} {$rule-value.unit} {$rule-value.dimensions}"

 

output sumsaligned

/** filter the concept by dimensions with a wildcard to not include the default **/

{set(@concept=$myconcept @dimensions=*).sum}

message

"The sum of the dimensions for {$myconcept} is {$rule-value}."

 

I hope this helps.

 

Sincerely,

David

--

---
You received this message because you are subscribed to a topic in the Google Groups "Arelle-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/arelle-users/5GIW9bqYdlU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to arelle-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/arelle-users/2453ed83-0987-4455-98e6-49b64b6c364fn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages