Using C:\Program Files\MATLAB\R2025a\bin\matlab.exe
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python313\Scripts\smt.exe\__main__.py", line 7, in <module>
sys.exit(smt())
~~~^^
File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python313\Lib\site-packages\sumatra\cli\smt.py", line 32, in smt
main(sys.argv[2:])
~~~~^^^^^^^^^^^^^^
File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python313\Lib\site-packages\sumatra\commands.py", line 411, in run
executable = get_executable(path=executable_path)
File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python313\Lib\site-packages\sumatra\programs.py", line 228, in get_executable
program = Executable(path)
File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python313\Lib\site-packages\sumatra\programs.py", line 77, in __init__
self.version = version or self._get_version()
~~~~~~~~~~~~~~~~~^^
File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python313\Lib\site-packages\sumatra\programs.py", line 104, in _get_version
returncode, output, err = run("%s --version" % self.path,
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
shell=True, timeout=5)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python313\Lib\site-packages\sumatra\core.py", line 69, in run
signal.signal(signal.SIGALRM, alarm_handler)
^^^^^^^^^^^^^^
AttributeError: module 'signal' has no attribute 'SIGALRM'. Did you mean: 'SIGABRT'?
It appears
_get_version()does not get specialized for either matlab nor python on Windows. I suspect that this is because.exeis automatically tacked on the executable name, and then the lookup does not recognize it. The generic handler will not work for either program.I am also not sure that Matlab specifically will print the message to the commandline, it would be better and faster to search the output of
matlab -hforversion_pattern_matlab = re.compile(r'(?<=Version: )(?P<version>\d.+)\b').In a somewhat less relevant issue,
SIGALRMis OS specific and not defined on Windows, but I guess it's supposed to crash anyway so it doesn't matter.Error message
smt run -e matlab -m .\test.m parameters.m