You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior:
The script silently looks for powershell in another castle (just like it silently ignores all the other paths that don't have powershell inside).
Actual behavior:
Version 3.10 was not found in the local cache
Version 3.[10](https://github.com/[REDACTED]) is available for downloading
Download from "https://github.com/actions/python-versions/releases/download/3.10.[11]([REDACTED])-11114431484/python-3.10.11-win32-x64.zip"
Extract downloaded archive
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\pwsh': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\pwsh'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\pwsh.COM': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\pwsh.COM'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\pwsh.EXE': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\pwsh.EXE'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\pwsh.BAT': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\pwsh.BAT'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\pwsh.CMD': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\pwsh.CMD'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\pwsh.VBS': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\pwsh.VBS'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\pwsh.VBE': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\pwsh.VBE'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\pwsh.JS': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\pwsh.JS'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\pwsh.JSE': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\pwsh.JSE'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\pwsh.WSF': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\pwsh.WSF'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\pwsh.WSH': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\pwsh.WSH'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\pwsh.MSC': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\pwsh.MSC'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.COM': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.COM'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.EXE': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.EXE'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.BAT': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.BAT'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.CMD': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.CMD'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.VBS': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.VBS'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.VBE': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.VBE'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.JS': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.JS'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.JSE': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.JSE'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.WSF': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.WSF'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.WSH': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.WSH'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.MSC': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.MSC'
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath 'E:\actions-runner\_work\_temp\python-3.10.11-win32-x64.zip' -DestinationPath 'E:\actions-runner\_work\_temp\e46b37f5-3822-4202-b[19]([REDACTED])f-33e8b0077f1e' -Force } else {[System.IO.Compression.ZipFile]::ExtractToDirectory('E:\actions-runner\_work\_temp\python-3.10.11-win32-x64.zip', 'E:\actions-runner\_work\_temp\e46b37f5-3822-4[20]([REDACTED])2-b19f-33e8b0077f1e', $true) }"
Execute installation script
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.COM': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.COM'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.EXE': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.EXE'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.BAT': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.BAT'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.CMD': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.CMD'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.VBS': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.VBS'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.VBE': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.VBE'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.JS': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.JS'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.JSE': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.JSE'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.WSF': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.WSF'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.WSH': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.WSH'
Unexpected error attempting to determine if executable file exists 'D:\Program Files\Perforce\powershell.MSC': Error: UNKNOWN: unknown error, stat 'D:\Program Files\Perforce\powershell.MSC'
Check if Python hostedtoolcache folder exist...
Check if current Python version is installed...
Python3.10 (x64) was found in E:\actions-runner\_work\_tool\Python...
Deleting E:\actions-runner\_work\_tool\Python\3.10.11\x64...
Remove registry entries for Python 3.10(x64)...
The text was updated successfully, but these errors were encountered:
Hi @benoithudson 👋,
Thank you for your report. We attempted to reproduce the issue but were unable to do so.
The setup-python action uses the extractZip function from the actions/toolkit to extract downloaded ZIP archives. This function relies on PowerShell to handle the extraction and searches for the powershell.exe executable in the system’s PATH environment variable.
However, issues arise when the PATH variable contains references to non-existent directories or drives. These invalid paths can cause confusion and errors, especially when trying to execute programs or scripts that depend on the paths listed in the PATH variable.
Leaving invalid paths in the PATH variable is not ideal. It's best practice to clean up the PATH to prevent unnecessary confusion, save system resources, and avoid potential failures in scenarios where the executable (e.g., PowerShell) cannot be located in any valid paths.
To address this problem, it's crucial to remove invalid or non-existent paths from the PATH variable. There are two main approaches to permanently clean up the PATH:
Option 1: Manually Clean the PATH in Windows: You can manually clean the PATH variable using the Environment Variables settings in Windows.
Option 2: Automated Cleanup via PowerShell Script: If you prefer an automated method, you can use a PowerShell script to clean up the PATH variable permanently on the system. For more information, you can refer to the official Microsoft documentation.
Description:
My PATH includes a path on the D: drive. I no longer have a D: drive. This causes a bunch of error spam in my build logs.
Action version:
actions/setup-python@v5
Platform:
Runner type:
Tools version:
runner 2.321
Repro steps:
D:\Program Files\Perforce
but there's no D: drive.Expected behavior:
The script silently looks for powershell in another castle (just like it silently ignores all the other paths that don't have powershell inside).
Actual behavior:
The text was updated successfully, but these errors were encountered: