Crash with example series_units.vm
Instant evaluation:
Traceback (most recent call last):
File "vre-language/src/virtmat/language/utilities/errors.py", line 302, in wrapper
return func(*args, **kwargs)
File "vre-language/src/virtmat/language/cli/run_model.py", line 113, in evaluate_prog
print(f'program output: >>>\n{prog.value}\n<<<')
File "/usr/lib/python3.10/functools.py", line 981, in __get__
val = self.func(instance)
File "vre-language/src/virtmat/language/utilities/errors.py", line 211, in wrapper
raise TextXError(str(err), **get_location_context(obj)) from err
textx.exceptions.TextXError: vre-language/examples/series_units.vm:1:1: => 's_num = (numbers: 1, 2, 3, 4)
print(s_num)
s_len1 = (distance: 1 [kilometer], 2 [meter], 3 [meter], 4 [meter])
print(s_len1)
s_len2 = (distance: 1, 2, 3, 4) [centimeter]
print(s_len2)
a = 1 [meter]
b = 2 [nanometer]
s_len3 = (distance: a, b, b, a)
print(s_len3)'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "python-3.10.12/bin/texts", line 8, in <module>
sys.exit(texts())
File "vre-language/src/virtmat/language/cli/__init__.py", line 25, in texts
clargs.func(clargs)
File "vre-language/src/virtmat/language/cli/run_model.py", line 156, in main
evaluate_prog(prog)
File "vre-language/src/virtmat/language/utilities/errors.py", line 304, in wrapper
process_error(err)
File "vre-language/src/virtmat/language/utilities/errors.py", line 292, in process_error
raise err.__cause__
File "vre-language/src/virtmat/language/utilities/errors.py", line 207, in wrapper
return func(*args, **kwargs)
File "vre-language/src/virtmat/language/utilities/types.py", line 211, in wrapper
return checktype_(func(obj), obj.type_)
File "vre-language/src/virtmat/language/interpreter/instant_executor.py", line 50, in program_value
vals = [p.value for p in get_children_of_type('Print', self) if p.value]
File "vre-language/src/virtmat/language/interpreter/instant_executor.py", line 50, in <listcomp>
vals = [p.value for p in get_children_of_type('Print', self) if p.value]
File "vre-language/src/virtmat/language/utilities/errors.py", line 304, in wrapper
process_error(err)
File "vre-language/src/virtmat/language/utilities/errors.py", line 292, in process_error
raise err.__cause__
File "vre-language/src/virtmat/language/utilities/errors.py", line 207, in wrapper
return func(*args, **kwargs)
File "vre-language/src/virtmat/language/interpreter/instant_executor.py", line 125, in print_value
return ' '.join(formatter(par.value) for par in self.params)
File "vre-language/src/virtmat/language/interpreter/instant_executor.py", line 125, in <genexpr>
return ' '.join(formatter(par.value) for par in self.params)
File "vre-language/src/virtmat/language/utilities/formatters.py", line 99, in formatter
ret = formatter_series(val)
File "vre-language/src/virtmat/language/utilities/formatters.py", line 63, in formatter_series
assert len(units) == 1
AssertionError