`az` command error: __init__() got multiple values for keyword argument 'default_completer'
See original GitHub issueAfter installing az cli in Ubuntu 17 server, a command to az vm open-port
is failing.
Environment summary
- Ubuntu 17 Server VM
Steps to reproduce
- Create a Ubuntu 17 VM from Azure portal
- ssh to it
- Install the azure CLI:
sudo apt install azure-cli
- Try to open the RDP port using the command
az vm open-port --resource-group your-resource-group-name --name your-vm-name --port 3389
which result in error
__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'
az --version
command works fine:
vm-ubuntu@ubu-17:~$ az --version
Python (Linux) 3.6.3 (default, Oct 3 2017, 21:45:48)
[GCC 7.2.0]
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
"__init__() got multiple values for keyword argument 'name ...
Firstly, make your first parameter self . You don't have to, but it is very, very common, and when someone is reading your...
Read more >TypeError: __init__() got multiple values for argument 'atoms'
hello i have problem running vasp: TypeError: init() got multiple values for argument 'atoms'
Read more >TypeError: __init__() got multiple values for argument 'sides'
As far as I can tell, I have the same code as Kenneth, but I keep getting this trace back error. TypeError: init()...
Read more >__init__() got multiple values for argument - You.com | The ...
This happens when a keyword argument is specified that overwrites a positional argument. For example, let's imagine a function that draws a colored...
Read more >What's New in Emacs 28.1?
When non-nil, some commands like 'describe-symbol' show more detailed ... To get the old behavior back, add the following to your init file:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Install the latest CLI through https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest
This is the same as: https://github.com/Azure/azure-cli/issues/6148#issue-315801494 https://github.com/Azure/azure-cli/issues/4692 https://github.com/Azure/azure-cli/issues/973
In short, Ubuntu shipped with a version of the CLI that’s very old.
No, this is all what
az --version
outputs. It is just printing blank lines followed by the Python version information.Seems like all requests to
az
is failing. Failing silently in case ofaz --version
by outputting the final Python information and caught exception in case of other commands. Any prerequisites before installing azure cli when usingbash
from Windows machine while SSH ing to a new Ubuntu VM?