I am trying to timeout a command run using Runnner.run(..., timeout=3) (invoke >= 1.6.0, python == 3.7.11) but under Windows 10 I get the following error:
Traceback (most recent call last):
File "~\AppData\Local\Continuum\anaconda3\envs\Project\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "~\AppData\Local\Continuum\anaconda3\envs\Project\lib\threading.py", line 1177, in run
self.function(*self.args, **self.kwargs)
File "~\AppData\Local\Continuum\anaconda3\envs\Project\lib\site-packages\invoke\runners.py", line 1313, in kill
os.kill(pid, signal.SIGKILL)
AttributeError: module 'signal' has no attribute 'SIGKILL'
Hi!
I am trying to timeout a command run using
Runnner.run(..., timeout=3)
(invoke >= 1.6.0, python == 3.7.11) but under Windows 10 I get the following error:It seems that
SIGKILL
is not available in windows: https://docs.python.org/3/library/signal.html#signal.SIGKILLHere is some more context, potential solutions and caveats: https://stackoverflow.com/a/35792192