Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
bmmtf
Frequent Visitor

azure-core package dependency version

I have a custom package that I have imported to an environment. Suddenly my notebooks using this environment are running into an error:

ImportError: cannot import name 'AccessTokenInfo' from 'azure.core.credentials' (/home/trusted-service-user/cluster-env/trident_env/lib/python3.11/site-packages/azure/core/credentials.py)

 

My package uses azure-core version 1.38.2, it seems Fabric runtime 1.3 uses azure-core 1.30.2. My notebooks weren't running into this error before, and I have not made any updates to my package dependencies, I have basically changed nothing and my notebooks are suddenly breaking. Has the runtime changed it's azure-core dependency version? Am I not able to upgrade this built-in package version?

1 ACCEPTED SOLUTION
bmmtf
Frequent Visitor

Only viable solution appears to be downgrading azure-core and azure-identity dependencies to those used by Fabric Runtime and refactoring the custom package.

View solution in original post

6 REPLIES 6
bmmtf
Frequent Visitor

Only viable solution appears to be downgrading azure-core and azure-identity dependencies to those used by Fabric Runtime and refactoring the custom package.

bmmtf
Frequent Visitor

Hey @deborshi_nag can confirm the Spark Runtime has not changed for the environment, it is set at 1.3.

 

Understand the version of azure-core is controlled by Microsoft, can't understand why this has suddenly become breaking after no changes on our end, but not the first time it's happened in Fabric!

tayloramy
Super User
Super User

Hi @bmmtf

 

What happens if you remove the custom library, save the environment, wait a few minutes, and then add it back in?  





If you found this helpful, consider giving some Kudos.
If I answered your question or solved your problem, mark this post as the solution!

Join the Fabric Discord!

Proud to be a Super User!





@tayloramy afraid still the same error

bmmtf
Frequent Visitor

After further investigation, it appears to be due to my azure-identity 1.25.2 package that depends on azure-core>=1.31.0. The azure-identity __init__.py file imports an AccessTokenInfo class from azure.core.credentials that is not present in azure-core version 1.30.2. Still not sure as to why this has randomly started raising the error, but worked fine in the past.

Hello @bmmtf one possible explanation is if someone changed the Spark Runtime in your Environment item. Microsoft unfortunately doesn't publish their Spark runtime version against the azure-core library version being used. 

 

The version of azure-core is controlled by Fabric runtime. It may also change when Microsoft updates the Spark runtime! 

 

I trust this will be helpful. If you found this guidance useful, you are welcome to acknowledge with a Kudos or by marking it as a Solution.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.