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.

ModuleNotFoundError: No module named 'azure.mgmt.security.models._security_center_enums'; 'azure.mgmt.security.models' is not a package on Kali linux

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az security pricing list

Errors:

The command failed with an unexpected error. Here is the traceback:
No module named 'azure.mgmt.security.models._security_center_enums'; 'azure.mgmt.security.models' is not a package
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 561, in execute
    self.commands_loader.load_arguments(command)
  File "/usr/lib/python3/dist-packages/azure/cli/core/__init__.py", line 507, in load_arguments
    self.command_table[command].load_arguments()  # this loads the arguments via reflection
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 318, in load_arguments
    super(AzCliCommand, self).load_arguments()
  File "/usr/lib/python3/dist-packages/knack/commands.py", line 104, in load_arguments
    cmd_args = self.arguments_loader()
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/command_operation.py", line 125, in arguments_loader
    op = self.get_op_handler(self.op_path)
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/command_operation.py", line 59, in get_op_handler
    handler = import_module(mod_to_import)
  File "/usr/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/lib/python3/dist-packages/azure/cli/command_modules/security/custom.py", line 35, in <module>
    from azure.mgmt.security.models._security_center_enums import Enum69
ModuleNotFoundError: No module named 'azure.mgmt.security.models._security_center_enums'; 'azure.mgmt.security.models' is not a package

To Reproduce:

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

  • Put any pre-requisite steps here…
  • az security pricing list

Expected Behavior

Environment Summary

Linux-5.15.0-kali3-amd64-x86_64-with-glibc2.35, Kali GNU/Linux Rolling
Python 3.10.5
Installer: DEB

azure-cli 2.42.0

Extensions:
azure-devops 0.24.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.2.1

Additional Context

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
SaurabhSharma-MSFTcommented, Dec 7, 2022

@kabene I checked now with Kali and I am able to reproduce your error.
image I am checking now internally on this issue and get back to you at the earliest. Thanks.

0reactions
kabenecommented, Dec 7, 2022

@SaurabhSharma-MSFT what happen if you remove azure.mgmt.security.models._security_center_enums’; ‘azure.mgmt.security.models’ because my kali get that it is not a package and i cannot add it manually.

I’ve tried multiple times to uninstall the cli and install it again but it seems to still be broken

Read more comments on GitHub >

github_iconTop Results From Across the Web

No module named 'azure.mgmt.managementgroups ... - GitHub
Package Name: azure collection Package Version: 1.10 Operating System: RHEL Python ... The error was: ModuleNotFoundError: No module named ...
Read more >
ModuleNotFoundError: No module named 'azure.mgmt ...
After upgrading ansible to version 2.10.5 and python3.8.10 my playbook.yml fails with this error. ModuleNotFoundError: No module named 'azure.
Read more >
ModuleNotFoundError: No module named 'azure-mgmt-storage'
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'azure-mgmt-storage' How to remove the.
Read more >
Modulenotfounderror: no module named azure ( Solved )
ModuleNotFoundError is a python error. In most cases, you will get errors when you are importing a specific python package into your system....
Read more >
Kali Linux 2022.4 brings new tools, Azure images and desktop ...
The Kali Linux distribution was developed for network penetration tests, security audits and cybersecurity research. The team provided various ...
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