-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to unzip the Python package on Windows-2022 Core server #819
Comments
Hello @imarinov3, Thank you for creating this issue and we will get back you once we have some feedback on this :) |
The tag https://github.com/npm/node-semver#advanced-range-syntax |
I'm facing the same issue on a Windows self-hosted runner (with any python 3.9, 3.10 and 3.11). 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 'C:\actions-runner\_work\_temp\968efb97-afa0-4870-9856-654bd5dcc1ae' -DestinationPath 'C:\actions-runner\_work\_temp\843ebfd5-ab48-4451-b81f-a43[31](https://github.com/myorg/myproject/actions/runs/8102206303/job/22144158811#step:3:33)6e491e7' -Force } else {[System.IO.Compression.ZipFile]::ExtractToDirectory('C:\actions-runner\_work\_temp\968efb97-afa0-4870-9856-654bd5dcc1ae', 'C:\actions-runner\_work\_temp\843ebfd5-ab48-4451-b81f-a43316e491e7', $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 'C:\actions-runner\_work\_tem ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:String) [Expand-Archive], IOException
+ FullyQualifiedErrorId : NotSupportedArchiveFileExtension,Expand-Archive
Error: The process 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' failed with exit code 1 But the strange thing is that downgrading to |
Related to actions#819 Changes include: - Fixing ExtractToDirectory call by removing third attribute. This function accepts a third argument but it should be of type 'System.Text.Encoding' not 'System.Boolean' - Reordering extract utils to first attemps ExtractToDirectory and then Expand-Archive. For some reason the download CPython release was not correctly handled by Expand-Archive. This could be happening if the zip file was compressed using an unsupported compression method (e.g. through `zip` with Unix/linux).
@SMoraisAnsys yes, there is no other option. I am worrying about that version 4 is not working on node20. |
Hello @imarinov3 , |
Hello @priyagupta108 , did you test on self-hosted runner with windows 2022 ? |
@priyagupta108 From what I've seen through
You can make it back to version 5 afterward (unless your self-hosted runner is on a VM that is deployed on the fly). If it is still running, then previous version of installed CPython version are leveraged. Thus you can use @priyagupta108 I took the time to reproduce the error in https://github.com/ansys/pyedb/actions/runs/8112180616/job/22172843447. In this case, i tried to use a new python version (never used yet) with our windows self-hosted runner. Please have a look at #827 which should patch this problem. At least it worked on our other repo. If you want, I can push another commit to the CI to switch the use of |
Due to actions/setup-python#819, it fails to install python on a Windows 11 (or presumably Server 2022) self-hosted runner, when a suitable version of python was not already installed. Closes msys2#85 This partially reverts commit d5779cd.
Due to actions/setup-python#819, it fails to install python on a Windows 11 (or presumably Server 2022) self-hosted runner, when a suitable version of python was not already installed. Closes #85 This partially reverts commit d5779cd.
Related to actions#819 Changes consist in reordering extract utils to first attemps ExtractToDirectory and then Expand-Archive. For some reason the download CPython release was not correctly handled by Expand-Archive. This could be happening if the zip file was compressed using an unsupported compression method (e.g. through `zip` with Unix/linux).
@priyagupta108 I took the liberty to reproduce the error on a github runner. The associated branch (https://github.com/SMoraisAnsys/setup-python/tree/test/no-pwshpath) consists in removing a part of the code of PR that can be used to oversee the changes : SMoraisAnsys#1 |
@priyagupta108 Any updates on this issue or the proposed solution (#827) ? Seems like the problem was reproduced using github GPU runners, see ultralytics/ultralytics#9515 |
@actions/setup-actions-team @aparnajyothi-y @priyagupta108 Are there plans to resolve this as there does not seem to be much activity in the past month? |
Ran into this issue with the Windows GPU runners ultralytics/ultralytics#9515 a fix would definitely be appreciated. Thank @SMoraisAnsys for your input and guidance. FYI, I downloaded the zip file from the link in the workflow |
Hello Everyone, A potential solution to this issue seems to be provided in the following pull request: toolkit PR#1552. |
My reading of that PR is that it just adds wrappers on top of the existing methods, and the underlying issue with |
Hello Everyone, |
@priyagupta108 I'll have a look right away ! |
This worked fine on our CICD, see bellow @priyagupta108 Can we expect a new release with those changes in the coming days ? |
Our workflow running on Windows also works fine. |
Hello, |
Description:
A clear and concise description of what the bug is.
Action version:
2.313.0
Platform:
Runner type:
Tools version:
Repro steps:
Expected behavior:
To install the required Python version
Actual behavior:
Failed to unzip Python package
Run actions/setup-python@v5
with:
python-version: 3.6.x - 3.11.x
check-latest: false
token: ***
update-environment: true
allow-prereleases: false
env:
DEBUG: 1
Installed versions
Version 3.6.x - 3.11.x was not found in the local cache
Version 3.6.x - 3.11.x is available for downloading
Download from "https://github.com/actions/python-versions/releases/download/3.11.8-7809691605/python-3.11.8-win[32](https://github.com/abaltatech/weblink/actions/runs/7950776332/job/21720913455#step:3:34)-x64.zip"
Extract downloaded archive
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 'C:\actions-runner_work_temp\370840e9-4c83-483f-a8af-1541c208a31e' -DestinationPath 'C:\actions-runner_work_temp\e587df2a-0014-4ec2-9433-6002add0f7c7' -Force } else {[System.IO.Compression.ZipFile]::ExtractToDirectory('C:\actions-runner_work_temp[37](https://github.com/abaltatech/weblink/actions/runs/7950776332/job/21720913455#step:3:39)08[40](https://github.com/abaltatech/weblink/actions/runs/7950776332/job/21720913455#step:3:42)e9-4c83-483f-a8af-15[41](https://github.com/abaltatech/weblink/actions/runs/7950776332/job/21720913455#step:3:44)c208a31e', 'C:\actions-runner_work_temp\e587df2a-0014-4ec2-9433-6002add0f7c7', $true) }"
Expand-Archive : is not a supported archive file format. .zip is the only supported archive file format.
At line:1 char:210
Error: The process 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' failed with exit code 1
The text was updated successfully, but these errors were encountered: