Repository navigation
Closed
Labels
bugSomething isn't working
Description
Description:
The action fails to install Python on a Windows 10 self-hosted runner. The following error is encountered:
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 'D:\ANSYSDev\actions-runner\_work\_temp\14631187-76a2-41c4-a7d1-8e9f15a8ab70' -DestinationPath 'D:\ANSYSDev\actions-runner\_work\_temp\e4873571-c293-4d72-ac71-50341e9e0d70' -Force } else {[System.IO.Compression.ZipFile]::ExtractToDirectory('D:\ANSYSDev\actions-runner\_work\_temp\14631187-76a2-41c4-a7d1-8e9f15a8ab70', 'D:\ANSYSDev\actions-runner\_work\_temp\e4873571-c293-4d72-ac71-50341e9e0d70', $true) }"
Expand-Archive : is not a supported archive file format. .zip is the only supported archive file format.
At line:1 char:210
+ ... Ignore)) { Expand-Archive -LiteralPath 'D:\ANSYSDev\actions-runner\_ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:String) [Expand-Archive], IOException
+ FullyQualifiedErrorId : NotSupportedArchiveFileExtension,Expand-Archive
This is working on the GitHub windows-latest-8-core runner. It seems setup-python is not the only one impacted. eg:
I have both Powershell 5.1 and 7.4.3 installed but as you can see the action seems to be picking the former.
Action version:
v5
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
3.10
Repro steps:
I simply added the following into my CI workflow file and it fails.
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
Expected behavior:
Python is downloaded and unzipped, the action works as expected.
Actual behavior:
It's not downloaded and installed.
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
RobPasMue commentedon Jul 5, 2024
Related to #819
v-aparnajyothi-y commentedon Jul 5, 2024
Hello @dnwillia-work, Thank you for creating this issue and we will look into it :)
dnwillia-work commentedon Jul 5, 2024
@aparnajyothi-y No problem. @RobPasMue suggested I try v4 as a workaround and I can confirm that this is working.
Downgrade setup-python due to actions/setup-python#904
v-priyagupta108 commentedon Aug 8, 2024
Hi @dnwillia-work 👋,
We've merged PR #916 into the main branch with a potential fix. Could you please confirm that it works as expected for
actions/setup-python@main?SMoraisAnsys commentedon Aug 8, 2024
It just worked on my CICD, see bellow
v-priyagupta108 commentedon Aug 16, 2024
Hi @dnwillia-work 👋,
Just following up to see if you've had a chance to test the fix merged in PR #916 with
actions/setup-python@main. Could you please confirm if it resolves the issue?Thanks!
v-priyagupta108 commentedon Aug 27, 2024
Hello @dnwillia-work 👋,
As previously mentioned, we've merged PR #916 into the
mainbranch with a potential fix, which will be included in the upcoming release ofactions/setup-python.I am closing this issue now. If you encounter any further issues, please feel free to reopen or create a new issue.
Thank you for your understanding and cooperation!