Evaluation of series with different compatible units causes crash
The following input leads to a set of error mesages and a program/session crash:
~>$ texts session -r -w
Input > a = 1 [meter]
Input > b = 2 [centimeter]
Input > ser1 = (dist1: a ,b)
Input > print(ser1)
The crash can also be triggered by print(type(ser1))
, or area = map((x: x*x), ser1)
followed by print(area)
.
So basically any evaluation of the series ser1
.
The error message is the following:
[...]
File "/home/rodri/Programs/miniconda3/envs/vre-language/lib/python3.9/site-packages/virtmat/language/utilities/formatters.py", line 63, in formatter_series
assert len(units) == 1
AssertionError
The above exception was the direct cause of the following exception:
[...]
File "/home/rodri/Programs/miniconda3/envs/vre-language/lib/python3.9/site-packages/virtmat/language/utilities/errors.py", line 337, in wrapper
raise RuntimeError('non-handled exception') from err
RuntimeError: non-handled exception
The above exception was the direct cause of the following exception:
[...]
File "/home/rodri/Programs/miniconda3/envs/vre-language/lib/python3.9/site-packages/virtmat/language/utilities/errors.py", line 337, in wrapper
raise RuntimeError('non-handled exception') from err
RuntimeError: non-handled exception
The above exception was the direct cause of the following exception:
[...]
File "/home/rodri/Programs/miniconda3/envs/vre-language/lib/python3.9/site-packages/virtmat/language/utilities/errors.py", line 337, in wrapper
raise RuntimeError('non-handled exception') from err
RuntimeError: non-handled exception
The above exception was the direct cause of the following exception:
[...]
File "/home/rodri/Programs/miniconda3/envs/vre-language/lib/python3.9/site-packages/virtmat/language/utilities/errors.py", line 337, in wrapper
raise RuntimeError('non-handled exception') from err
RuntimeError: non-handled exception
If the example is stripped from units, or both elements have the same units, then the model works without problems.