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.

List index error when executing `az advisor configuration show`

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az advisor configuration show

Errors:

The command failed with an unexpected error. Here is the traceback:
list index out of range
Traceback (most recent call last):
  File "/opt/az/lib/python3.8/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 658, in execute
    raise ex
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 692, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/command_operation.py", line 363, in handler
    show_exception_handler(ex)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/arm.py", line 429, in show_exception_handler
    raise ex
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/command_operation.py", line 361, in handler
    return op(**command_args)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/advisor/custom.py", line 85, in show_configuration
    return list(output)[0]
IndexError: list index out of range

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 advisor configuration show

Expected Behavior

Environment Summary

Linux-5.4.0-109-generic-x86_64-with-glibc2.29, Ubuntu 20.04.4 LTS
Python 3.8.13
Installer: DEB

azure-cli 2.36.0

Additional Context

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sstoopscommented, Jun 1, 2022

We have finally been able to submit a support ticket through our support vendor. ID: 2206010040007526

1reaction
RakeshMohanMSFTcommented, May 20, 2022

@sstoops This advisor must have at least one default configuration when we get it by subscription API (the default), therefore I suggest you trying this API call once and let me know what output you get. https://docs.microsoft.com/en-us/rest/api/advisor/configurations/list-by-subscription.

If that API call is also empty then you will have to file a support ticket.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug] "IndexError: list index out of range" from `az pipelines list ...
Describe the bug Attempting to list releases in my client's Azure DevOps instance returned a Python IndexError.
Read more >
List Index Out of Range – Python Error Message Solved
Using the wrong value in the range() function in a Python for loop. You'll get the Indexerror: list index out of range error...
Read more >
az advisor configuration | Microsoft Learn
Show Azure Advisor configuration for the given subscription or resource group. az advisor configuration update. Update Azure Advisor configuration.
Read more >
"list index out of range" error in AzureML inference schema
"list index out of range" error is pretty self-explanatory. Means you try to access a member of a list that doesnt exist. Have...
Read more >
Diagnosing and Repairing Failures with Data Recovery Advisor
Thus, repeatedly executing LIST FAILURE reveals new failures only if the database automatically diagnosed them in response to errors that occurred in between ......
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