Skip to content

Az 2.48.1 ImportError: cannot import name 'Request' from partially initialized module 'requests.models' #26272

@EdneiMonteiro

Description

@EdneiMonteiro

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az servicebus namespace create

Errors:

The command failed with an unexpected error. Here is the traceback:
cannot import name 'Request' from partially initialized module 'requests.models' (most likely due to a circular import) (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\requests\models.pyc)
Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 707, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 1156, in _is_poller
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/util.py", line 686, in poller_classes
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrestazure/__init__.py", line 28, in <module>
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrestazure/azure_configuration.py", line 34, in <module>
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/__init__.py", line 28, in <module>
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/configuration.py", line 37, in <module>
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/pipeline/__init__.py", line 52, in <module>
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\requests/__init__.py", line 135, in <module>
ImportError: cannot import name 'Request' from partially initialized module 'requests.models' (most likely due to a circular import) (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\requests\models.pyc)

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 servicebus namespace create --name ANY-VALID-NAME --sku Premium --resource-group MY-RG --location brazilsouth

Expected Behavior

Service successfully created. Just like with Az Cli 2.47.

Environment Summary

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

azure-cli 2.48.1

Extensions:
resource-graph 2.1.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0

Additional Context

I found that by removing the location parameter the command works again.

Metadata

Metadata

Labels

Auto-AssignAuto assign by botCXP AttentionThis issue is handled by CXP team.Service Busaz servicebuscustomer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions