Azure / Azure/azure-devops-cli-extension

az artifacts universal download: File is not a zip file

Open
#1,117 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
682
Forks
278
Avg merge
3d 23h
Merged PRs (30d)
3

Description

The ` az artifacts universal download` is failing to download a universal package with error "File is not a zip file"

**Command Name**
`az artifacts universal download
Extension Name: azure-devops. Version: 0.19.0.`

**Errors:**
```
File is not a zip file
Traceback (most recent call last):
Lib\site-packages\knack\cli.py, ln 233, in invoke
cli\core\commands\__init__.py, ln 660, in execute
cli\core\commands\__init__.py, ln 723, in _run_jobs_serially
cli\core\commands\__init__.py, ln 715, in _run_job
...
artifacttool_binary_path = self._get_artifacttool(organization)
azext_devops\dev\common\artifacttool_updater.py, ln 74, in _get_artifacttool
_update_artifacttool(release_uri, release_id)
azext_devops\dev\common\artifacttool_updater.py, ln 114, in _update_artifacttool
f = zipfile.ZipFile(content)
zipfile.py, ln 1131, in __init__
zipfile.py, ln 1198, in _RealGetContents
zipfile.BadZipFile: File is not a zip file
```

## To Reproduce:
`az artifacts universal download --organization "https://dev.azure.com/AndrewWilde0938/" --project "5863fe84-1344-4d79-b86a-ab4e41f3a8bc" --scope project --feed "uni" --name "blah" --version "0.0.6" --path .`

## Expected Behavior

Succesfully downloads artifact

## Environment Summary
```
Windows-10-10.0.14393-SP0
Python 3.6.8
Installer: MSI

azure-cli 2.21.0

Extensions:
azure-devops 0.19.0

```
## Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.