mirror of
https://github.com/clearml/clearml-agent
synced 2025-04-25 00:24:07 +00:00
Fix FileNotFoundException crash in find_python_executable_for_version… (#192)
* Fix FileNotFoundException crash in find_python_executable_for_version (#164) * Add a Windows check for error 9009 when searching for Python --------- Co-authored-by: 12037964+ae-ae@users.noreply.github.com 12037964+ae-ae@users.noreply.github.com <ae-ae>
This commit is contained in:
parent
a2758250b2
commit
8b2970350c
@ -3365,7 +3365,14 @@ class Worker(ServiceCommandSection):
|
|||||||
stderr=subprocess.STDOUT
|
stderr=subprocess.STDOUT
|
||||||
)
|
)
|
||||||
except subprocess.CalledProcessError as ex:
|
except subprocess.CalledProcessError as ex:
|
||||||
self.log.warning("error getting %s version: %s", executable, ex)
|
# Windows returns 9009 code and suggests to install Python from Windows Store
|
||||||
|
if is_windows_platform() and ex.returncode == 9009:
|
||||||
|
self.log.debug("version not found: {}".format(ex))
|
||||||
|
else:
|
||||||
|
self.log.warning("error getting %s version: %s", executable, ex)
|
||||||
|
continue
|
||||||
|
except FileNotFoundError as ex:
|
||||||
|
self.log.debug("version not found: {}".format(ex))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not default_python:
|
if not default_python:
|
||||||
|
Loading…
Reference in New Issue
Block a user