# Set up an empty directory for this demonstration:
» mkdir az-bug
» cd az-bug
# Pretend you work in a large company, with a large repository, and your CWD happens to have a subdirectory in it,
# and it's name is…
» mkdir brotli
# Let's run az!
» az
Error loading command module 'acs': module 'brotli' has no attribute 'error'
Error loading command module 'appservice': module 'brotli' has no attribute 'error'
Error loading command module 'aro': module 'brotli' has no attribute 'error'
Error loading command module 'batch': module 'brotli' has no attribute 'error'
Error loading command module 'iot': module 'brotli' has no attribute 'error'
Error loading command module 'netappfiles': module 'brotli' has no attribute 'error'
Error loading command module 'network': module 'brotli' has no attribute 'error'
Error loading command module 'rdbms': module 'brotli' has no attribute 'error'
Error loading command module 'serviceconnector': module 'brotli' has no attribute 'error'
Error loading command module 'sqlvm': module 'brotli' has no attribute 'error'
Error loading command module 'vm': module 'brotli' has no attribute 'error'
/\
/ \ _____ _ _ ___ _
/ /\ \ |_ / | | | \'__/ _\
/ ____ \ / /| |_| | | | __/
/_/ \_\/___|\__,_|_| \___|
Welcome to the cool new Azure CLI!
Use `az --version` to display the current version.
Here are the base commands:
Auto upgrade failed. name 'exit_code' is not defined
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 59, in get_op_handler
handler = import_module(mod_to_import)
File "/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/azure/cli/command_modules/find/custom.py", line 12, in <module>
import requests
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/requests/__init__.py", line 43, in <module>
import urllib3
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/urllib3/__init__.py", line 13, in <module>
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/urllib3/connectionpool.py", line 40, in <module>
from .response import HTTPResponse
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/urllib3/response.py", line 157, in <module>
class HTTPResponse(io.IOBase):
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/urllib3/response.py", line 390, in HTTPResponse
DECODER_ERROR_CLASSES += (brotli.error,)
AttributeError: module 'brotli' has no attribute 'error'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 575, in execute
self.help.show_welcome(subparser)
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/knack/help.py", line 722, in show_welcome
help_file = self.group_help_cls(self, '', parser)
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/knack/help.py", line 253, in __init__
child.load(options)
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/azure/cli/core/_help.py", line 296, in load
loader.versioned_load(self, options)
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/azure/cli/core/_help_loaders.py", line 154, in versioned_load
super(CliHelpFile, help_obj).load(parser) # pylint:disable=bad-super-call
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/knack/help.py", line 198, in load
description = getattr(options, 'description', None)
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/knack/parser.py", line 241, in __getattribute__
self.description = self._description() \
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 133, in description_loader
op = self.get_op_handler(self.op_path)
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 66, in get_op_handler
raise ValueError("The operation '{}' is invalid.".format(op_path))
ValueError: The operation 'azure.cli.command_modules.find.custom#process_query' is invalid.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/azure/cli/__main__.py", line 49, in <module>
exit_code = cli_main(az_cli, sys.argv[1:])
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/azure/cli/__main__.py", line 36, in cli_main
return cli.invoke(args)
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/knack/cli.py", line 245, in invoke
exit_code = self.exception_handler(ex)
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/azure/cli/core/__init__.py", line 127, in exception_handler
return handle_exception(ex)
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/azure/cli/core/util.py", line 59, in handle_exception
from msrestazure.azure_exceptions import CloudError
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/msrestazure/__init__.py", line 28, in <module>
from .azure_configuration import AzureConfiguration
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/msrestazure/azure_configuration.py", line 34, in <module>
from msrest import Configuration
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/msrest/__init__.py", line 28, in <module>
from .configuration import Configuration
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/msrest/configuration.py", line 37, in <module>
from .pipeline import Pipeline
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/msrest/pipeline/__init__.py", line 52, in <module>
from requests.structures import CaseInsensitiveDict
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/requests/__init__.py", line 43, in <module>
import urllib3
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/urllib3/__init__.py", line 13, in <module>
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/urllib3/connectionpool.py", line 40, in <module>
from .response import HTTPResponse
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/urllib3/response.py", line 157, in <module>
class HTTPResponse(io.IOBase):
File "/usr/local/Cellar/azure-cli/2.42.0/libexec/lib/python3.10/site-packages/urllib3/response.py", line 390, in HTTPResponse
DECODER_ERROR_CLASSES += (brotli.error,)
AttributeError: module 'brotli' has no attribute 'error'
Related command
Literally anything; we'll use
azas the example, butaz --helpand anything more complicated also fails.Describe the bug
To Reproduce
Run any
azin any directory where there exists a subdirectory named "brotli".Expected behavior
azdoesn't crash.Environment summary
macOs, installed via
brew;az --version
Additional context