Hello,
I am currently learning XULE from this tutorial:
https://education.xbrl.org/mod/lesson/view.php?id=75&pageid=46&startlastseen=noand the provided jupyter notebook:
https://hub.2i2c.mybinder.org/user/xbrlus-xule-psdkbsox/doc/tree/sample.ipynbThe first cell executes with no issues, the second:
%%writefile 'sample.xule'
/** add constants and namespaces below **/
/** modify rule below **/
output example
assert negfact satisfied
[nonils @concept.is-monetary = true @period = date('2021-12-31')]#nonnegitem < 0
message
"The value of the {$nonnegitem.concept.balance} balance item {$nonnegitem.concept.local-name} at {$nonnegitem.period} is {$nonnegitem} {$nonnegitem.unit}, which is less than zero. Please review this data in the filing, as it may require a negated label."
also creates the 'sample.xule' file as instructed, but once I want to execute:
!arelleCmdLine -f "
https://www.sec.gov/Archives/edgar/data/1753673/000121390022027184/f20f2021_scienjoyhold.htm" \
--plugins "xule | transforms/SEC" --xule-compile "sample.xule" --xule-run --xule-rule-set "sample.zip" \
--logFormat="[%(messageCode)s] %(message)s"
the result is an error:
[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.
[info] Activation of plug-in SEC Inline Transforms successful, version 19.2.
[info] Xule version: 3.0.30041
2026-06-11T12:35:33.768527: sample.xule parse start
Exception in thread Thread-1 (threaded_parse):
Traceback (most recent call last):
File "/srv/conda/envs/notebook/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
self.run()
File "/srv/conda/envs/notebook/lib/python3.12/threading.py", line 1012, in run
self._target(*self._args, **self._kwargs)
File "/srv/conda/envs/notebook/lib/python3.12/site-packages/arelle/plugin/xule/XuleParseFile.py", line 23, in threaded_parse
parseRes = xule_grammar.parseFile(full_file_name).as_dict()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/conda/envs/notebook/lib/python3.12/site-packages/pyparsing/util.py", line 256, in _inner
return fn(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/conda/envs/notebook/lib/python3.12/site-packages/pyparsing/core.py", line 1962, in parse_file
raise exc.with_traceback(None)
pyparsing.exceptions.ParseException: Expected string_end, found '#' (at char 175), (line:6, col:66)
clearly there is a problem with the '#' character. I did some digging in the XuleParseFile.py and xule_grammar.py and the parseRes dictionary contains the info on what to do with the '#' literal. Yet, the pyparsing package has a problem with it.