azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

az apim list fails with ModuleNotFoundError

Open tehyatt opened this issue 7 years ago • 16 comments

Describe the bug

az apim list fails with ModuleNotFoundError using version 2.0.72 of the CLI, which I installed yesterday.

Command Name az apim list

Errors:

No module named 'azure.mgmt.apimanagement.models.api_management_client_enums'
Traceback (most recent call last):
pip-install-qxmmnr17\knack\knack\cli.py, ln 206, in invoke
cli\core\commands\__init__.py, ln 523, in execute
azure\cli\core\__init__.py, ln 291, in load_arguments
cli\core\commands\__init__.py, ln 290, in load_arguments
pip-install-qxmmnr17\knack\knack\commands.py, ln 97, in load_arguments
azure\cli\core\__init__.py, ln 488, in default_arguments_loader
azure\cli\core\__init__.py, ln 528, in get_op_handler
...
<frozen importlib._bootstrap>, ln 955, in _find_and_load_unlocked
<frozen importlib._bootstrap>, ln 665, in _load_unlocked
<frozen importlib._bootstrap_external>, ln 678, in exec_module
<frozen importlib._bootstrap>, ln 219, in _call_with_frames_removed
cli\command_modules\apim\custom.py, ln 9, in <module>
ModuleNotFoundError: No module named 'azure.mgmt.apimanagement.models.api_management_client_enums'

To Reproduce:

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

-No prerequisites_

  • az apim list

Expected Behavior

The CLI would list the API Mangement resources in my subscription.

Environment Summary

Windows-10-10.0.17134-SP0
Python 3.6.6
Shell: cmd.exe

azure-cli 2.0.72

Additional Context

tehyatt avatar Sep 04 '19 13:09 tehyatt

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @mjconnection

ghost avatar Sep 05 '19 10:09 ghost

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @mjconnection

ghost avatar Sep 05 '19 10:09 ghost

Same issue.

Environment Summary

Windows7 Enterprise 6.1.7601 64-bit Python 3.6.6 Shell: powershell.exe azure-cli 2.0.72

Installer was run with a privilege limited user, then UAC prompt was authorized with a different user with admin rights.

xlash avatar Sep 05 '19 18:09 xlash

Just ran into this now on windows server 2019. I'm running inside a VM on a private subnet (same vnet as APIM, different subnet). Also 2.0.072.

oising avatar Sep 09 '19 21:09 oising

This is a blocker for me. Any updates?

oising avatar Sep 19 '19 02:09 oising

Any update? I also ran into this issue on Windows 10.

Windows-10-10.0.18362 Python 3.6.6 Shell: cmd.exe

azure-cli 2.0.73

akezyt avatar Sep 20 '19 15:09 akezyt

Same problem as #10496. I made a pull request that should fix this: #10623

jurgyy avatar Sep 24 '19 12:09 jurgyy

I'm also having this issue. az apim list fails with:


No module named 'azure.mgmt.apimanagement.models.api_management_client_enums'
Traceback (most recent call last):
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-mjd5h3hf\knack\knack\cli.py", line 206, in invoke
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-mjd5h3hf\azure-cli-core\azure\cli\core\commands\__init__.py", line 523, in execute
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-mjd5h3hf\azure-cli-core\azure\cli\core\__init__.py", line 294, in load_arguments
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-mjd5h3hf\azure-cli\azure\cli\command_modules\apim\__init__.py", line 28, in load_arguments
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-mjd5h3hf\azure-cli\azure\cli\command_modules\apim\_params.py", line 11, in <module>
ModuleNotFoundError: No module named 'azure.mgmt.apimanagement.models.api_management_client_enums'

Version of CLI is:

azure-cli                         2.0.77

command-modules-nspkg              2.0.3
core                              2.0.77
nspkg                              3.0.4
telemetry                          1.0.4

Extensions:
aks-preview                       0.4.17
azure-cli-iot-ext                  0.8.6
azure-devops                      0.16.0

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\xxxx\.azure\cliextensions'

Python (Windows) 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

lokijota avatar Dec 02 '19 14:12 lokijota

I'm running into this same issue. Same versions as the last comment.

bdschaap avatar Dec 02 '19 16:12 bdschaap

Just run into this issue as well. Using: ` azure-cli 2.0.78

command-modules-nspkg 2.0.3 core 2.0.78 nspkg 3.0.4 telemetry 1.0.4 `

kpietralik avatar Jan 03 '20 10:01 kpietralik

Same issue: azure-cli 2.0.80

command-modules-nspkg 2.0.3 core 2.0.80 nspkg 3.0.4 telemetry 1.0.4

shuttlek avatar Jan 22 '20 10:01 shuttlek

Same here:

azure-cli 2.0.81

command-modules-nspkg 2.0.3 core 2.0.81 nspkg 3.0.4 telemetry 1.0.4

amd989 avatar Feb 04 '20 17:02 amd989

same here with az apim delete:

No module named 'azure.mgmt.apimanagement.models.api_management_client_enums'
Traceback (most recent call last):
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-0u_uiwkq\knack\knack\cli.py", line 206, in invoke
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-0u_uiwkq\azure-cli-core\azure\cli\core\commands\__init__.py", line 528, in execute
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-0u_uiwkq\azure-cli-core\azure\cli\core\__init__.py", line 300, in load_arguments
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-0u_uiwkq\azure-cli\azure\cli\command_modules\apim\__init__.py", line 28, in load_arguments
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-0u_uiwkq\azure-cli\azure\cli\command_modules\apim\_params.py", line 11, in <module>
ModuleNotFoundError: No module named 'azure.mgmt.apimanagement.models.api_management_client_enums'
To open an issue, please run: 'az feedback'

version info: az --version

C:\WINDOWS\system32>az --version
azure-cli                          2.1.0

command-modules-nspkg              2.0.3
core                               2.1.0
nspkg                              3.0.4
telemetry                          1.0.4

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\Niek\.azure\cliextensions'
Python (Windows) 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.

nmaarse avatar Feb 18 '20 12:02 nmaarse

Would really like an update on this. Same issue as everyone else.

JoshuaPHolden avatar Mar 09 '20 17:03 JoshuaPHolden

@tehyatt Looks like this has since been fixed and I can confirm that there is no error now. Apologies for no updates on this issue sooner. Unless you are still seeing this error on your end, I believe this could be closed.

PramodValavala-MSFT avatar Feb 02 '22 15:02 PramodValavala-MSFT

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

ghost avatar Feb 09 '22 20:02 ghost