Azure / azure-iot-cli-extension

Azure IoT extension for Azure CLI
Other
83 stars 65 forks source link

az iot hub monitor-events error #540

Closed AiHaibara closed 2 years ago

AiHaibara commented 2 years ago

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az iot hub monitor-events Extension Name: azure-iot. Version: 0.10.13.

Errors:

The command failed with an unexpected error. Here is the traceback:
gather() got an unexpected keyword argument 'loop'
Traceback (most recent call last):
  File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 231, 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 697, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/home/alan_liu/.azure/cliextensions/azure-iot/azext_iot/operations/hub.py", line 2756, in iot_hub_monitor_events
    _iot_hub_monitor_events(
  File "/home/alan_liu/.azure/cliextensions/azure-iot/azext_iot/operations/hub.py", line 2897, in _iot_hub_monitor_events
    start_single_monitor(
  File "/home/alan_liu/.azure/cliextensions/azure-iot/azext_iot/monitor/telemetry.py", line 34, in start_single_monitor
    return start_multiple_monitors(
  File "/home/alan_liu/.azure/cliextensions/azure-iot/azext_iot/monitor/telemetry.py", line 68, in start_multiple_monitors
    future = asyncio.gather(*coroutines, loop=loop, return_exceptions=True)  # pylint: disable=deprecated-argument
TypeError: gather() got an unexpected keyword argument 'loop'

To Reproduce:

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

Expected Behavior

Environment Summary

Linux-5.4.0-1085-azure-x86_64-with-glibc2.28 (Cloud Shell), Common Base Linux Delridge (quinault)
Python 3.10.4
Installer: DEB

azure-cli 2.37.0

Extensions:
eventgrid 0.4.9
azure-iot 0.10.13
application-insights 0.1.8
ai-examples 0.2.5
ssh 1.1.1

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

Additional Context

AiHaibara commented 2 years ago

az iot hub monitor-events --hub-name xxxx Dependency update (uamqp 1.2) required for IoT extension version: 0.15.0. Continue? (y/n) -> y The command failed with an unexpected error. Here is the traceback: gather() got an unexpected keyword argument 'loop'.

fixed by:

az extension update --name azure-iot
az iot hub monitor-events --hub-name xxxx

Dependency update (uamqp 1.2) required for IoT extension version: 0.15.0. Continue? (y/n) -> y Updating required dependency... Update complete. Executing command... Starting event monitor, use ctrl-c to stop...