question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ComputeManagementClientConfiguration' object has no attribute 'api_version'

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az image list

Errors:

The command failed with an unexpected error. Here is the traceback:
'ComputeManagementClientConfiguration' object has no attribute 'api_version'
Traceback (most recent call last):
  File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/opt/az/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 "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 710, in _run_job
    result = list(result)
  File "/opt/az/lib/python3.10/site-packages/azure/core/paging.py", line 129, in __next__
    return next(self._page_iterator)
  File "/opt/az/lib/python3.10/site-packages/azure/core/paging.py", line 76, in __next__
    self._response = self._get_next(self.continuation_token)
  File "/opt/az/lib/python3.10/site-packages/azure/mgmt/compute/v2022_08_01/operations/_images_operations.py", line 951, in get_next
    request = prepare_request(next_link)
  File "/opt/az/lib/python3.10/site-packages/azure/mgmt/compute/v2022_08_01/operations/_images_operations.py", line 936, in prepare_request
    _next_request_params["api-version"] = self._config.api_version
AttributeError: 'ComputeManagementClientConfiguration' object has no attribute 'api_version'

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 image list

Expected Behavior

Returns the list of images.

Environment Summary

Linux-5.14.0-1054-oem-x86_64-with-glibc2.31, Ubuntu 20.04.5 LTS
Python 3.10.5
Installer: DEB

azure-cli 2.41.0

Additional Context

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jfsimoneaucommented, Oct 21, 2022
0reactions
prbobbacommented, Oct 21, 2022

We are facing the same issue when running list command for Disk Encryption sets

prbobba-a04:~ prbobba$ az disk-encryption-set list
The command failed with an unexpected error. Here is the traceback:
'ComputeManagementClientConfiguration' object has no attribute 'api_version'
Traceback (most recent call last):
  File "/usr/local/Cellar/azure-cli/2.41.0/libexec/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/local/Cellar/azure-cli/2.41.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/usr/local/Cellar/azure-cli/2.41.0/libexec/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 "/usr/local/Cellar/azure-cli/2.41.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 710, in _run_job
    result = list(result)
  File "/usr/local/Cellar/azure-cli/2.41.0/libexec/lib/python3.10/site-packages/azure/core/paging.py", line 129, in __next__
    return next(self._page_iterator)
  File "/usr/local/Cellar/azure-cli/2.41.0/libexec/lib/python3.10/site-packages/azure/core/paging.py", line 76, in __next__
    self._response = self._get_next(self.continuation_token)
  File "/usr/local/Cellar/azure-cli/2.41.0/libexec/lib/python3.10/site-packages/azure/mgmt/compute/v2022_03_02/operations/_disk_encryption_sets_operations.py", line 1020, in get_next
    request = prepare_request(next_link)
  File "/usr/local/Cellar/azure-cli/2.41.0/libexec/lib/python3.10/site-packages/azure/mgmt/compute/v2022_03_02/operations/_disk_encryption_sets_operations.py", line 1005, in prepare_request
    _next_request_params["api-version"] = self._config.api_version
AttributeError: 'ComputeManagementClientConfiguration' object has no attribute 'api_version'

Listing images is working correctly for me.

I am using latest azure-cli

{
  "azure-cli": "2.41.0",
  "azure-cli-core": "2.41.0",
  "azure-cli-telemetry": "1.0.8",
  "extensions": {}
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

azure.mgmt.compute.ComputeManagementClient class
The api-version parameter sets the default API version if the operation group is not described in the profile. In this article. Constructor; Methods;...
Read more >
Azure Async Python SDK Error when iterating through VM list
_config.api_version AttributeError: 'ComputeManagementClientConfiguration' object has no attribute 'api_version'.
Read more >
azure.mgmt.compute package - NET
config (ComputeManagementClientConfiguration) – Configuration for client. Parameters ... api_version (str) – API version to use if no profile is provided, ...
Read more >
azure-mgmt-compute 29.0.0 - PyPI
credentials parameter has been renamed credential. The config attribute no longer exists on a client, configuration should be passed as kwarg. Example: MyClient ......
Read more >
Azure SDK for Python Documentation - Read the Docs
Some of the new generated libraries have not yet been tested ... A paging container for iterating over a list of ClassicAdministrator object....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found