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.

az servicebus namespace list fails in subscription with no namespaces

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

When calling az servicebus namespace list in a subscription that does not contain any service bus namespaces, an error is returned instead of an empty array.

Command Name az servicebus namespace list

Errors:

The command failed with an unexpected error. Here is the traceback:
'NoneType' object is not iterable
Traceback (most recent call last):
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 710, in _run_job
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/paging.py", line 129, in __next__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/paging.py", line 84, in __next__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/servicebus/v2022_01_01_preview/operations/_namespaces_operations.py", line 747, in extract_data
TypeError: 'NoneType' object is not iterable

To Reproduce:

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

  • Select subscription that does not contain any Service Bus namespaces
  • az servicebus namespace list

Expected Behavior

An empty json array should be returned

Environment Summary

Windows-10-10.0.19042-SP0
Python 3.10.5
Installer: MSI

azure-cli 2.40.0

Extensions:
application-insights 0.1.16
azure-devops 0.25.0
logic 0.1.6
virtual-wan 0.2.13

Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1

Additional Context

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Strandfeltcommented, Oct 10, 2022

@navba-MSFT Yes, that command does indeed work without errors. Thanks.

0reactions
navba-MSFTcommented, Oct 10, 2022

@Strandfelt Thanks for getting back. We will now proceed with closure of this GitHub issue. If you need any further assistance on this issue in future, please feel free to reopen this thread. We would be happy to help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

az servicebus namespace list throws an exception #20499
I issued this command when logged in to a subscription that does not have service bus configured. The text was updated successfully, but...
Read more >
az servicebus - Microsoft Learn
Manage Azure Service Bus namespaces, queues, topics, subscriptions, rules and geo-disaster recovery configuration alias. In this article. Commands. Commands. az ...
Read more >
How to solve “The subscription is not registered to use ...
Steps to solve it ... From the portal, select All services. Select Subscriptions. From the list of subscriptions, select the subscription you want ......
Read more >
Get-AzureRmServiceBusNamespace -Name - Stack Overflow
If you just run it without any parameter i.e. Get-AzureRmServiceBusNamespace , it will list all the namespaces in the subscription, i.e. call ...
Read more >
Subscription is not registered to use namespace Microsoft ...
Introduction. I was working through setting up Azure AB B2C (link) at the weekend and came across an error when trying to set...
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