bebound / azure-cli

Azure Command-Line Interface
MIT License
0 stars 0 forks source link

az login failure using ubuntu 22.04 terminal: TypeError: SubscriptionClient.__init__() got an unexpected keyword argument 'user_agent' #14

Open bebound opened 1 year ago

bebound commented 1 year ago

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az login

Errors:

The command failed with an unexpected error. Here is the traceback:
SubscriptionClient.__init__() got an unexpected keyword argument 'user_agent'
Traceback (most recent call last):
  File "/home/uppaluru/.local/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/home/uppaluru/.local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/home/uppaluru/.local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/home/uppaluru/.local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
    result = cmd_copy(params)
  File "/home/uppaluru/.local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
    return self.handler(*args, **kwargs)
  File "/home/uppaluru/.local/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/home/uppaluru/.local/lib/python3.10/site-packages/azure/cli/command_modules/profile/custom.py", line 139, in login
    subscriptions = profile.login(
  File "/home/uppaluru/.local/lib/python3.10/site-packages/azure/cli/core/_profile.py", line 176, in login
    subscriptions = subscription_finder.find_using_common_tenant(username, credential)
  File "/home/uppaluru/.local/lib/python3.10/site-packages/azure/cli/core/_profile.py", line 737, in find_using_common_tenant
    client = self._create_subscription_client(credential)
  File "/home/uppaluru/.local/lib/python3.10/site-packages/azure/cli/core/_profile.py", line 828, in _create_subscription_client
    client = client_type(credential, api_version=api_version,
TypeError: SubscriptionClient.__init__() got an unexpected keyword argument 'user_agent'

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Expected Behavior

Environment Summary

Linux-5.15.0-56-generic-x86_64-with-glibc2.35, Ubuntu 22.04.1 LTS
Python 3.10.6
Installer: PIP

azure-cli 2.43.0

Additional Context

Copy from https://github.com/Azure/azure-cli/issues/25072

similar-bot-test[bot] commented 1 year ago
Find similar issue https://github.com/Azure/azure-cli/issues/21189.
Issue title az login not working: TypeError: SubscriptionClient.init() got an unexpected keyword argument 'user_agent'
Create time 2022-02-03
Comment number 2