如何修复Azure-CLI命令az以使用Azure管道上载通用软件包?

时间:2019-08-06 21:17:38

标签: azure azure-devops devops azure-artifacts

我试图在构建管道之后运行az命令以将文件夹内容作为通用程序包上传到Azure。那是最后一步。

我正在尝试运行以下命令。

az artifacts universal publish \
    --organization "https://myamazingorganization.com" \
    --feed "my_favorite_feed" \
    --name "myupackage" \
    --version "1.0.0-SNAPSHOT" \
    --description "My Universal Package" \
    --path <path_to_directory>

但是在收到诸如Downloading Universal Packages tooling (ArtifactTool_linux-x64_0.2.101): 1.84%之类的成功消息后,我收到以下错误:

The command failed with an unexpected error. Here is the traceback:

'module' object has no attribute 'uuid4'
Traceback (most recent call last):
  File "/usr/lib64/az/lib/python2.7/site-packages/knack/cli.py", line 206, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/lib64/az/lib/python2.7/site-packages/azure/cli/core/commands/__init__.py", line 603, in execute
    raise ex
AttributeError: 'module' object has no attribute 'uuid4'

我正在使用CentOS Linux release 7.6.1810 (Core)。要安装Azure-CLI,请按照https://docs.microsoft.com/pt-br/cli/azure/install-azure-cli-yum?view=azure-cli-latest中所述的步骤进行操作。

我的az版本描述是:

azure-cli                         2.0.70

command-modules-nspkg               2.0.3
core                              2.0.70
nspkg                              3.0.4
telemetry                          1.0.3

Extensions:
azure-devops                      0.12.0

Python location '/bin/python'
Extensions directory '/home/azure/.azure/cliextensions'

Python (Linux) 2.7.5 (default, Jun 20 2019, 20:27:34)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

Legal docs and information: aka.ms/AzureCliLegal


Your CLI is up-to-date.

如何解决此问题以完成发布流程?

0 个答案:

没有答案