[Python-modules-team] Bug#962952: azure-cli: exception when connecting to azure services

Jakub Wilk jwilk at jwilk.net
Fri Jul 10 15:15:49 BST 2020


* Luca Boccassi <bluca at debian.org>, 2020-07-10, 09:54:
>(note that the monitor functionality is but one of the many features
>and subcommands, hence the downgrade in severity).

It's not just the monitor functionality, whatever that is.
All the "az vm" commands are broken, e.g.:

   $ az vm list
   The command failed with an unexpected error. Here is the traceback:

   No module named 'antlr4'
   Traceback (most recent call last):
     File "/usr/lib/python3/dist-packages/knack/cli.py", line 215, in invoke
       cmd_result = self.invocation.execute(args)
     File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 553, in execute
       self.commands_loader.load_arguments(command)
     File "/usr/lib/python3/dist-packages/azure/cli/core/__init__.py", line 345, in load_arguments
       loader.load_arguments(command)  # this adds entries to the argument registries
     File "/usr/lib/python3/dist-packages/azure/cli/command_modules/vm/__init__.py", line 31, in load_arguments
       from azure.cli.command_modules.vm._params import load_arguments
     File "/usr/lib/python3/dist-packages/azure/cli/command_modules/vm/_params.py", line 31, in <module>
       from azure.cli.command_modules.monitor.actions import get_period_type
     File "/usr/lib/python3/dist-packages/azure/cli/command_modules/monitor/actions.py", line 7, in <module>
       import antlr4
   ModuleNotFoundError: No module named 'antlr4'

The "az vm" commands are so fundamental, that this bug renders the 
package unusable IMO.

As a quick&dirty work-around, I've moved the import to the function that 
uses it; see the attachment.

-- 
Jakub Wilk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 962952-workaround.diff
Type: text/x-diff
Size: 854 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/python-modules-team/attachments/20200710/d1b601a6/attachment.diff>


More information about the Python-modules-team mailing list