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.

EventHubs Namespace List Fails when there are no EventHub Namespaces.

See original GitHub issue

EventHubs Namespace List Fails with no EventHubs

Command: az eventhubs namespace list --subscription=<subscription-id>

Errors:

The command failed with an unexpected error. Here is the traceback:
'NoneType' object is not iterable
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 705, in _run_job
    result = list(result)
  File "/opt/az/lib/python3.8/site-packages/azure/core/paging.py", line 129, in __next__
    return next(self._page_iterator)
  File "/opt/az/lib/python3.8/site-packages/azure/core/paging.py", line 84, in __next__
    self.continuation_token, self._current_page = self._extract_data(self._response)
  File "/opt/az/lib/python3.8/site-packages/azure/mgmt/eventhub/v2021_06_01_preview/operations/_namespaces_operations.py", line 98, in extract_data
    return deserialized.next_link or None, iter(list_of_elem)
TypeError: 'NoneType' object is not iterable

To Reproduce:

Run az eventhubs namespace list --subscription=<id> in a subscription that contains no EventHub namespaces.

Expected Behavior

No namespaces are returned, no errors.

Environment Summary

Linux-5.13.0-37-generic-x86_64-with-glibc2.29, Ubuntu 20.04.4 LTS
Python 3.8.12
Installer: DEB

azure-cli 2.34.1

Extensions:
account 0.2.1
azure-iot 0.9.6

Dependencies:
msal 1.16.0
azure-mgmt-resource 20.0.0

Additional Context

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
Saglodhacommented, Oct 17, 2022

Thanks for reporting this @scsibug. I could reproduce the issue at my side and would be investigating this ahead with the team. I would share updates soon.

0reactions
scsibugcommented, Oct 16, 2022

How is this a feature request? The feature is clearly documented in the help page (az eventhubs namespace list), where it lists the option --subscription : Name or ID of subscription. Simply using that argument in a brand new cloudshell today continues to give the stacktrace from the original report.

Documented features giving stacktraces seems like a bug, no?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Event Hubs - Resource Manager exceptions
Error code Error subcode Error message BadRequest 40000 PartitionCount can't be changed for an event hub. BadRequest none The specified name isn't available. BadRequest none Can't...
Read more >
What's the difference between deleting an eventhub and ...
For example, I have two event hub namespaces named A and B. A and B both contain a topic called C. I want...
Read more >
Azure Event Hubs and its Complete Overview
Metadata is the replication of entities and their settings associated with the namespace. Messages and events are not replicated. The metadata between primary ......
Read more >
Microsoft: Azure Event Hub
An Event Hub Namespace is a container for individual Event Hubs. You aren't creating any Event Hubs in this step, just creating a...
Read more >
Azure Event Hubs “Role Based Access Control” in action
Azure Event Hubs is streaming platform and event ingestion service that can ... is to have an Azure Event Hubs namespace along with...
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