Azure / azure-cli

Azure Command-Line Interface
MIT License
3.95k stars 2.93k forks source link

No module named 'azure.mgmt.web.v2020_12_01' - az staticwebapp functions link #25403

Open AndreasKratzig opened 1 year ago

AndreasKratzig commented 1 year ago

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az staticwebapp functions link

Errors:

cli.azure.cli.core.azclierror: Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/invocation.py", line 111, in _validation
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 849, in _validate_cmd_level
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/_validators.py", line 315, in validate_staticsite_link_function
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/web/_web_site_management_client.py", line 779, in static_sites
ModuleNotFoundError: No module named 'azure.mgmt.web.v2020_12_01'

cli.azure.cli.core.azclierror: No module named 'azure.mgmt.web.v2020_12_01'
az_command_data_logger: No module named 'azure.mgmt.web.v2020_12_01'

To Reproduce:

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

Expected Behavior

Environment Summary

Windows-10-10.0.22621-SP0
Python 3.10.8
Installer: MSI

azure-cli 2.45.0

Extensions:
application-insights 0.1.18
containerapp 0.3.21
webapp 0.4.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1

Additional Context

yonzhan commented 1 year ago

route to CXP team

dkowalec commented 1 year ago

Any update @AndreasKratzig @yonzhan as I'm experiencing the same issue and can't deploy

navba-MSFT commented 1 year ago

Adding service team to look into this.

dkowalec commented 1 year ago

FYI, rolling back to the previous tag release resolved our issue as a workaround. There might be something wrong with the LATEST release.

thrsn-ur commented 1 year ago

We are also experiencing this for our Azure DevOps pipelines running version 2.48.1: ERROR: No module named 'azure.mgmt.web.v2020_12_01'

dkowalec commented 1 year ago

We are also experiencing this for our Azure DevOps pipelines running version 2.48.1: ERROR: No module named 'azure.mgmt.web.v2020_12_01'

I can confirm downgrading to 2.46.0 worked for us until it's fixed @navba-MSFT

nezhar commented 1 year ago

We had the same issue in an azure pipeline where we link a function to a staticwebapp. Fixed it by rolling back with pip install azure-cli==2.47.0 in an additional step

AndreasKratzig commented 1 year ago

Hi all,

I had again the opportunity to check this and did some steps ahead to verify that I've installed the latest versions via:

winget upgrade --id Microsoft.AzureCLI pip install -U azure-cli az --version azure-cli 2.48.1 python --version Python 3.11.2 pip freeze azure-cli==2.48.1 azure-mgmt-web==7.0.0

With that the issue is gone for me and the command is working now without the error message _cli.azure.cli.core.azclierror: No module named 'azure.mgmt.web.v2020_1201'.

dankarmyy commented 1 year ago

This appears to still be in issue in v2.50.0

I'm seeing the same error in Azure Pipelines hosted agents Ubuntu 22.04.2 LTS.

I can confirm that the downgrade method to v2.47.0 works though.

cgdietz commented 11 months ago

still an error in v 2.52

sipkode commented 1 month ago

I just came across this issue, as I am running into this error on v2.62.0. Seems it is still open. ☹️