Model UUID not valid and crash in session
$ texts session
Input > %uuid
uuids: 672b2f3dc75d4a0ea308558e011b8799 ('672b2f3dc75d4a0ea308558e011b8799')
Input > %new
Started new session with uuids ('07fcc6312ed1467392d0e40246ad5592')
Input > %uuid
uuids: 07fcc6312ed1467392d0e40246ad5592 ('07fcc6312ed1467392d0e40246ad5592')
Input > %uuid 672b2f3dc75d4a0ea308558e011b8799
Input > %uuid
uuids: 672b2f3dc75d4a0ea308558e011b8799 (null)
Input > %uuid 07fcc6312ed1467392d0e40246ad5592
Input > %uuid
uuids: 07fcc6312ed1467392d0e40246ad5592 (null)
Starting a new session is even stranger:
$ texts session -u 07fcc6312ed1467392d0e40246ad5592
Input > %uuid
uuids: None (null)
Input > %hist
Traceback (most recent call last):
File "vre-language/src/virtmat/language/utilities/errors.py", line 285, in wrapper
return func(*args, **kwargs)
File "vre-language/src/virtmat/language/cli/run_session.py", line 87, in main
mgr.main_loop()
File "vre-language/src/virtmat/language/interpreter/session_manager.py", line 633, in main_loop
print(self.session.get_model_history(self.uuid))
File "vre-language/src/virtmat/language/interpreter/session_manager.py", line 186, in get_model_history
for fwk in self.get_model_nodes(uuid):
File "vre-language/src/virtmat/language/interpreter/session_manager.py", line 171, in get_model_nodes
return get_nodes_info(self.lpad, wf_q, fw_q, fw_p)[0]['nodes']
IndexError: list index out of range
The above exception was the direct cause of the following exception:
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/utilities/errors.py", line 314, in wrapper
raise RuntimeError('non-handled exception') from err
RuntimeError: non-handled exception
The crash with %hist
can be reproduced with any empty model:
$ texts session -u 9a2c6fd89c434789bfe356e944206317
Input > %hist
Traceback (most recent call last):
File "vre-language/src/virtmat/language/utilities/errors.py", line 285, in wrapper
return func(*args, **kwargs)
File "vre-language/src/virtmat/language/cli/run_session.py", line 87, in main
mgr.main_loop()
File "vre-language/src/virtmat/language/interpreter/session_manager.py", line 633, in main_loop
print(self.session.get_model_history(self.uuid))
File "vre-language/src/virtmat/language/interpreter/session_manager.py", line 186, in get_model_history
for fwk in self.get_model_nodes(uuid):
File "vre-language/src/virtmat/language/interpreter/session_manager.py", line 171, in get_model_nodes
return get_nodes_info(self.lpad, wf_q, fw_q, fw_p)[0]['nodes']
IndexError: list index out of range
The above exception was the direct cause of the following exception:
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/utilities/errors.py", line 314, in wrapper
raise RuntimeError('non-handled exception') from err
RuntimeError: non-handled exception
Edited by Ivan Kondov