Hi, I found a bug with the rml parsing code. It looks like hasNameConstant is never defined. I reproduced in 3.6.7 but I still see the bug in 3.6.8 code.
File "/virtualenv/cpm/lib/python3.9/site-packages/reportlab/lib/rl_safe_eval.py", line 267, in gen_none_node
return ast.NameConstant(value=None) if hasNameConstant else ast.Name(id='None', ctx=ast.Load())
NameError: asUnicodeEx(<rlextra.rml2pdf.rml2pdf.EvaluateOp object at 0x7fd2638a1a60>,enc='utf8') error: name 'hasNameConstant' is not defined
I believe the fix would be to change the line in gen_none_node to
return ast.NameConstant(value=None) if hasattr(ast, 'NameConstant') else ast.Name(id='None', ctx=ast.Load())
Not sure if that's the right fix since I don't know what hasNameConstant used to look like, but this will at least fix the issue I see.
Here is a paste of rml that reproduces the issue
Thanks