azure-devops-cli-extension icon indicating copy to clipboard operation
azure-devops-cli-extension copied to clipboard

"az repos list": TypeError: entry_points() got an unexpected keyword argument 'group'

Open offby1 opened this issue 4 years ago • 1 comments

This is autogenerated. Please review and update as needed.

Describe the bug

I typed the command and saw the stack trace. That's all I know.

Command Name az repos list Extension Name: azure-devops. Version: 0.18.0.

Errors:

The command failed with an unexpected error. Here is the traceback:
entry_points() got an unexpected keyword argument 'group'
Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.26.0/libexec/lib/python3.8/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/local/Cellar/azure-cli/2.26.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
    raise ex
  File "/usr/local/Cellar/azure-cli/2.26.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/usr/local/Cellar/azure-cli/2.26.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 712, in _run_job
    return cmd_copy.exception_handler(ex)
  File "/Users/erichanchrow/.azure/cliextensions/azure-devops/azext_devops/dev/common/exception_handler.py", line 31, in azure_devops_exception_handler
    reraise(*sys.exc_info())
  File "/usr/local/Cellar/azure-cli/2.26.0/libexec/lib/python3.8/site-packages/six.py", line 703, in reraise
    raise value
  File "/usr/local/Cellar/azure-cli/2.26.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
    result = cmd_copy(params)
  File "/usr/local/Cellar/azure-cli/2.26.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/usr/local/Cellar/azure-cli/2.26.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/Users/erichanchrow/.azure/cliextensions/azure-devops/azext_devops/dev/repos/repository.py", line 60, in list_repos
    organization, project = resolve_instance_and_project(detect=detect,
  File "/Users/erichanchrow/.azure/cliextensions/azure-devops/azext_devops/dev/common/services.py", line 362, in resolve_instance_and_project
    organization, project, _ = resolve_instance_project_and_repo(
  File "/Users/erichanchrow/.azure/cliextensions/azure-devops/azext_devops/dev/common/services.py", line 331, in resolve_instance_project_and_repo
    git_info = get_vsts_info_from_current_remote_url()
  File "/Users/erichanchrow/.azure/cliextensions/azure-devops/azext_devops/dev/common/services.py", line 395, in get_vsts_info_from_current_remote_url
    info = VstsGitUrlInfo(get_remote_url(VstsGitUrlInfo.is_vsts_url_candidate))
  File "/Users/erichanchrow/.azure/cliextensions/azure-devops/azext_devops/dev/common/vsts_git_url_info.py", line 42, in __init__
    vsts_info = self.get_vsts_info(remote_url)
  File "/Users/erichanchrow/.azure/cliextensions/azure-devops/azext_devops/dev/common/vsts_git_url_info.py", line 93, in get_vsts_info
    credentials = _get_credentials(uri)
  File "/Users/erichanchrow/.azure/cliextensions/azure-devops/azext_devops/dev/common/services.py", line 56, in _get_credentials
    if PAT_ENV_VARIABLE_NAME in os.environ or get_credential(organization) is not None:
  File "/Users/erichanchrow/.azure/cliextensions/azure-devops/azext_devops/dev/common/_credentials.py", line 17, in get_credential
    token = _get_credential(organization)
  File "/Users/erichanchrow/.azure/cliextensions/azure-devops/azext_devops/dev/common/_credentials.py", line 26, in _get_credential
    cred_store = CredentialStore()
  File "/Users/erichanchrow/.azure/cliextensions/azure-devops/azext_devops/dev/common/credential_store.py", line 19, in __init__
    self._initialize_keyring()
  File "/Users/erichanchrow/.azure/cliextensions/azure-devops/azext_devops/dev/common/credential_store.py", line 154, in _initialize_keyring
    keyring.core.init_backend(_only_builtin)
  File "/usr/local/lib/python3.8/site-packages/keyring/core.py", line 83, in init_backend
    set_keyring(_detect_backend(limit))
  File "/usr/local/lib/python3.8/site-packages/keyring/core.py", line 101, in _detect_backend
    filter(limit, backend.get_all_keyring()),
  File "/usr/local/lib/python3.8/site-packages/keyring/util/__init__.py", line 22, in wrapper
    func.always_returns = func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/keyring/backend.py", line 214, in get_all_keyring
    _load_plugins()
  File "/usr/local/lib/python3.8/site-packages/keyring/backend.py", line 198, in _load_plugins
    for ep in metadata.entry_points(group='keyring.backends'):
TypeError: entry_points() got an unexpected keyword argument 'group'

To Reproduce:

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

  • Put any pre-requisite steps here...
  • az repos list

Expected Behavior

I was expecting to see a list of all the repos in my organization.

Environment Summary

macOS-11.4-x86_64-i386-64bit
Python 3.8.11
Installer: HOMEBREW

azure-cli 2.26.0 *

Extensions:
azure-devops 0.18.0

Additional Context

offby1 avatar Jul 20 '21 15:07 offby1

I just noticed that some of the lines in the stack trace mentioned python3.8; that seemed wrong to me. So I did this:

/usr/local/opt/[email protected]/bin/python3.8 -m pip uninstall -y keyring

Then I tried az repos list again, and this time it worked.

So perhaps the az system is accidentally picking up python libraries from unrelated installations.

This doesn't feel like a good workaround, though, since I installed keyring into python3.8 for a reason; I'll need it back pretty soon.

offby1 avatar Jul 20 '21 15:07 offby1