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.

compatibility issues between azure-core and azure-cli: cannot import name 'case_insensitive_dict' from 'azure.core.utils'

See original GitHub issue

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command

Describe the bug We are noticing compatibility issues between azure-core and azure-cli: cannot import name ‘case_insensitive_dict’ from ‘azure.core.utils’. Until cli 2.37.0, AZ CLI had the dependency azure-core==1.21.1 Starting 2.38.0, AZ CLI is having dependency azure-core==1.24.0

In case, we install a package that has a direct or indirect dependency on the lower azure-core==1.21.1, the AZ CLI encounters the compatibility issues between azure-core and azure-cli and emits the error: cannot import name ‘case_insensitive_dict’ from ‘azure.core.utils’

To Reproduce Two ways of reproducing the issue:

  1. Install latest az cli
  2. Install any package that depends on lower older version of azure-core

image

or

  1. Install az cli (2.37.0 or lower)
  2. Install cli ML extension 2.5.0. (ML Extension brings in the latest azure-storage-blob package that depends on latest azure-core=1.24.0). az extension add --name ml --version 2.5.0

Expected behavior CLI should not fail.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
sozercancommented, Aug 2, 2022

We are also seeing this on az cli 2.37.0 and the latest version (0.5.92) of aks-preview extension.

https://dev.azure.com/AzureContainerUpstream/Azure Workload Identity/_build/results?buildId=52370&view=logs&j=3a3ff92c-2ab0-5cd5-ecad-e283f5e1d802&t=6d5f3379-e684-5896-70a5-701deb97a928

Pinning aks-preview to 0.5.87 resolved it.

0reactions
Uditanshu1612commented, Oct 18, 2022

Hi, Is the issue is resolved? I’m also facing the same issue while importing a package. Currently My azure-core is a version of 1.26.0 so while executing the module using this version of azure-core it throws me an error image

So here by observing the error I get to know that module requires an azure-core of version <=1.22.1. So if downgrade the version to 1.22.1 or less than that, then I’m facing an error image

did anyone have the solution how to resolve the error and successfully import the module?

Read more comments on GitHub >

github_iconTop Results From Across the Web

can't import installed azure.core module - Stack Overflow
First, you should not need "azure-core" to use this method on a compute client, I created an issue for that: ...
Read more >
azure-cli-core - PyPI
Microsoft Azure Command-Line Tools Core Module.
Read more >
credentials Module - azure-common - Microsoft Learn
For compatible azure-cli-core version (< 2.20.0), credentials will be the "az login" command: https://docs.microsoft.com/cli/azure/authenticate-azure-cli.
Read more >
azure-cli-core - Python Package Health Analysis - Snyk
Microsoft Azure Command-Line Tools Core Module For more information about how to use this package see README · Ensure you're using the healthiest...
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