vm open-port is failing. sudo apt install azure-cliaz 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]
Please post of the output of az --version. Also, do other commands work, or is it just this one?
The output of az --version
vm-ubuntu@ubu-17:~$ az --version
Python (Linux) 3.6.3 (default, Oct 3 2017, 21:45:48)
[GCC 7.2.0]
Other network command for example, az network route-table list also has same error result: TypeError: __init__() got multiple values for keyword argument 'default_completer'
See results below:
vm-ubuntu@ubu-17:~$ az network route-table list
__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'
vm-ubuntu@ubu-17:~$
az --version output should look something like:
azure-cli (2.0.32)
acr (2.0.24)
acs (2.0.33)
advisor (0.5.1)
appservice (0.1.32)
backup (1.1.1)
batch (3.2.1)
batchai (0.2.2)
billing (0.1.8)
cdn (0.0.14)
cloud (2.0.13)
cognitiveservices (0.1.12)
configure (2.0.15)
consumption (0.3.0)
container (0.1.23)
core (2.0.32)
cosmosdb (0.1.20)
dev-tools (0.1.1)
dla (0.0.19)
dls (0.0.21)
eventgrid (0.1.12)
eventhubs (0.1.2)
extension (0.0.12)
feedback (2.1.1)
find (0.2.9)
interactive (0.3.19)
iot (0.1.20)
keyvault (2.0.21)
lab (0.0.22)
monitor (0.1.6)
network (2.1.0)
nspkg (3.0.2)
profile (2.0.22)
rdbms (0.2.2)
redis (0.2.13)
reservations (0.1.2)
resource (2.0.28)
role (2.0.23)
servicebus (0.1.2)
servicefabric (0.0.12)
sql (2.0.25)
storage (2.0.32)
testsdk (0.1.1)
vm (2.0.31)
Extensions:
aem (0.1.1)
alias (0.4.0)
azure-cli-iot-ext (0.4.1)
image-copy-extension (0.0.5)
managementgroups (0.1.0)
managementpartner (0.1.2)
subscription (0.1.1)
webapp (0.2.0)
Python location 'C:\Users\trpresco\Documents\github\env3\Scripts\python.exe'
Extensions directory 'C:\Users\trpresco\.azure\cliextensions'
Python (Windows) 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)]
It seems you are only pasting the last line.
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 of az --version by outputting the final Python information and caught exception in case of other commands.
Any prerequisites before installing azure cli when using bash from Windows machine while SSH ing to a new Ubuntu VM?
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.
Most helpful comment
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.