Closed KP4AJ closed 10 months ago
From msys2 can use issue the command:
git describe --tags --dirty
The error message is that the git command is missing on that system, and this exception is not being handled as I did not test in on a system with out git installed.
Line 368 needs to be changed to:
except (FileNotFoundError, subprocess.CalledProcessError):
This will show up in a future pull request / patch to D-Rats.
Thanks John! Confirmed this solved the problem.
Hi John: I figured out how to use MSYS2! Now can test code more frequently. If I did not make a mistake when cloning git, I am getting there errors when trying to run D-rats (latest code): $ python d-rats.py Traceback (most recent call last): File "C:/Users/Edfel/D-Rats/d-rats.py", line 37, in
from d_rats.version import version
File "C:/Users/Edfel/D-Rats/d_rats/version.py", line 400, in
DRATS_VERSION_NUM = GLOBAL_VERSION.short_version
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:/Users/Edfel/D-Rats/d_rats/version.py", line 111, in short_version
self._get_short_version()
File "C:/Users/Edfel/D-Rats/d_rats/version.py", line 98, in _get_short_version
cls._get_version()
File "C:/Users/Edfel/D-Rats/d_rats/version.py", line 364, in _get_version
raw_version = subprocess.check_output(cmd).decode().strip()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:/msys64/mingw64/lib/python3.11/subprocess.py", line 466, in check_output
return run(popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:/msys64/mingw64/lib/python3.11/subprocess.py", line 548, in run
with Popen(popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:/msys64/mingw64/lib/python3.11/subprocess.py", line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:/msys64/mingw64/lib/python3.11/subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified
Previous to latest changes I had D-Rats working from MSYS2 nicely. Windows 10 64bit, will test Ubuntu tomorrow.
Be safe!
Edfel KP4AJ