Closed NicerNewerCar closed 1 year ago
Appears to be an issue with the PATH
variable used by os.environ
Appending the location of the autoscoper.exe
to the path from os.environ
and passing that to shutil.which
works fine to find the correct executable.
current_path = os.environ["path"]
my_path = current_path + ";/path/to/autoscoper/executable/"
location = shutil.which("autoscoper", path=my_path)
Note: SAM fails to launch Autoscoper because we are not installing it as a part of the Superbuild process
The command
shutil.which(autoscoper)
fails to find theautoscoper.exe
that is generated when the extension is built from source.Previously, whenever I built SA^M from source
shutil.which(autoscoper)
would return theautoscoper.exe
from the slicer cache directory (the version of SA^M downloaded from the extension manager).This issue was initially found by @amymmorton see PR #27.
https://github.com/BrownBiomechanics/SlicerAutoscoperM/blob/444e2b87168d2da48ac5c4be0bf56c560683b6a6/AutoscoperM/AutoscoperM.py#L247-L251