[Pkg-azure-team] Bug#855077: Bug#855077: azure-cli: Running az command fails with error
Antoine R. Dumont
antoine.romain.dumont at gmail.com
Fri Mar 3 15:14:34 UTC 2017
Hello,
I reproduce this after building the package, installing it and run simply
`az`.
After tracking this, adapting the upstream code in azure.cli.core module
from:
```python
class EmptyDefaultCompletionFinder(argcomplete.CompletionFinder):
def __init__(self, *args, **kwargs):
super(EmptyDefaultCompletionFinder, self).__init__(*args,
default_completer=lambda _: (),
**kwargs)
```
to:
```python
class EmptyDefaultCompletionFinder(argcomplete.CompletionFinder):
def __init__(self, *args, **kwargs):
kwargs['default_completer'] = lambda _: ()
super(EmptyDefaultCompletionFinder, self).__init__(*args, **kwargs)
```
fixes it.
Now running az, i obtain back the help message.
Now to figure out where i must adapt this.
After looking out some more, it seems upstream have fixed this already \o/
https://github.com/Azure/azure-cli/blob/master/src/azure-cli-core/azure/cli/core/parser.py#L41
Moving the default_completer in the caller of the function, which makes
sense.
Ok, so this package needs updating :D
Cheers,
On Mon, Feb 13, 2017 at 9:26 PM, Andy Hochhaus <andy at hochhaus.us> wrote:
> Package: azure-cli
> Version: 0.1.0~b7-1
> Severity: important
>
> Dear Maintainer,
>
> * What led up to the situation?
>
> After installing 'azure-cli', running the 'az' command fails with an error.
>
> * What exactly did you do (or not do) that was effective (or
> ineffective)?
>
> $ az
> Error loading command module 'storage'
> __init__() got multiple values for keyword argument 'default_completer'
> Traceback (most recent call last):
> File "/usr/lib/python3/dist-packages/azure/cli/main.py", line 35, in
> main
> cmd_result = APPLICATION.execute(args)
> File "/usr/lib/python3/dist-packages/azure/cli/core/application.py",
> line 84, in execute
> self.parser.load_command_table(command_table)
> File "/usr/lib/python3/dist-packages/azure/cli/core/parser.py", line
> 91, in load_command_table
> enable_autocomplete(self)
> File "/usr/lib/python3/dist-packages/azure/cli/core/parser.py", line
> 34, in enable_autocomplete
> argcomplete.autocomplete(parser, validator=lambda c, p:
> c.lower().startswith(p.lower()))
> File "/usr/lib/python3/dist-packages/argcomplete/__init__.py", line
> 166, in __call__
> default_completer=default_completer)
> File "/usr/lib/python3/dist-packages/azure/cli/core/parser.py", line
> 30, in __init__
> **kwargs)
> TypeError: __init__() got multiple values for keyword argument
> 'default_completer'
>
> * What was the outcome of this action?
>
> An error loading hte command module 'storage'.
>
> * What outcome did you expect instead?
>
> The azure cli to start
>
> -- System Information:
> Debian Release: 9.0
> APT prefers testing
> APT policy: (500, 'testing')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 4.8.6-x86_64-linode78 (SMP w/1 CPU core)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
>
> Versions of packages azure-cli depends on:
> ii python3-adal 0.4.4-1
> ii python3-applicationinsights 0.10.0-2
> ii python3-argcomplete 1.8.1-1
> ii python3-azure 2.0.0~rc6+dfsg-2
> ii python3-colorama 0.3.7-1
> ii python3-jmespath 0.9.0-2
> ii python3-msrest 0.4.4-1
> ii python3-msrestazure 0.4.7-1
> ii python3-pip 9.0.1-2
> ii python3-pygments 2.2.0+dfsg-1
> ii python3-requests 2.12.4-1
> ii python3-six 1.10.0-3
> ii python3-tabulate 0.7.7-1
> ii python3-urllib3 1.19.1-1
> ii python3-yaml 3.12-1
> pn python3:any <none>
>
> azure-cli recommends no packages.
>
> azure-cli suggests no packages.
>
> -- no debconf information
>
> _______________________________________________
> Pkg-azure-team mailing list
> Pkg-azure-team at lists.alioth.debian.org
> https://lists.alioth.debian.org/mailman/listinfo/pkg-azure-team
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-azure-team/attachments/20170303/7892b103/attachment.html>
More information about the Pkg-azure-team
mailing list