azure-cli
azure-cli copied to clipboard
local-exec provisioner error : cannot import name 'KeyInfo' from 'azure.mgmt.web.models
This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az webapp deployment source config-zip
Errors:
The command failed with an unexpected error. Here is the traceback:
cannot import name 'KeyInfo' from 'azure.mgmt.web.models' (/home/mtaallah/.local/lib/python3.10/site-packages/azure/mgmt/web/models/__init__.py)
Traceback (most recent call last):
File "/home/mtaallah/.local/lib/python3.10/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/home/mtaallah/.local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 561, in execute
self.commands_loader.load_arguments(command)
File "/home/mtaallah/.local/lib/python3.10/site-packages/azure/cli/core/__init__.py", line 515, in load_arguments
self.command_table[command].load_arguments() # this loads the arguments via reflection
File "/home/mtaallah/.local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 318, in load_arguments
super(AzCliCommand, self).load_arguments()
File "/home/mtaallah/.local/lib/python3.10/site-packages/knack/commands.py", line 104, in load_arguments
cmd_args = self.arguments_loader()
File "/home/mtaallah/.local/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 125, in arguments_loader
op = self.get_op_handler(self.op_path)
File "/home/mtaallah/.local/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/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 "/home/mtaallah/.local/lib/python3.10/site-packages/azure/cli/command_modules/appservice/custom.py", line 37, in <module>
from azure.mgmt.web.models import KeyInfo
ImportError: cannot import name 'KeyInfo' from 'azure.mgmt.web.models' (/home/mtaallah/.local/lib/python3.10/site-packages/azure/mgmt/web/models/__init__.py)
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 webapp deployment source config-zip --resource-group {} --name {} --src {}
Expected Behavior
Environment Summary
Linux-5.15.0-40-generic-x86_64-with-glibc2.35, Ubuntu 22.04.1 LTS
Python 3.10.4
Installer: PIP
azure-cli 2.37.0 *
Additional Context
route to CXP team
@Marwen-TAALLAH Thank you for reaching out, we are looking into it.
@Marwen-TAALLAH Did you get a chance to upgrade to latest version of az cli 2.39.0? if not, can you try and retry the command again please and let us know if it helps
Yes but now the code passes but not as it should, the idea is that i'm creating an azure app function via terraform and trying to upload the code on creation time, the function is created but i can't find the code! here's what it says on the azure portal:
Your app is currently in read only mode because you are running from a package file. To make any changes update the content in your zip file and WEBSITE_RUN_FROM_PACKAGE app setting.
@Marwen-TAALLAH Please go through this documentation https://docs.microsoft.com/en-us/azure/azure-functions/run-functions-from-deployment-package
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!