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.

ImportError: cannot import name 'SerializationError' from 'azure.core.exceptions'

See original GitHub issue
  • Package Name: azure-storage-blob
  • Package Version: 12.9.0
  • Operating System: Azure Databricks Cluster
  • Python Version: 3.8

Describe the bug Attempts to import BlobProperties from azure.storage.blob results in an error: ImportError: cannot import name 'SerializationError' from 'azure.core.exceptions' (/databricks/python/lib/python3.8/site-packages/azure/core/exceptions.py)

Importantly, this is something that started happening out of the blue, everything was working fine for quite some time. This seems to have occurred within this week. At the same time, we use fixed packages so the problem would have to be an integration problem: image

To Reproduce Steps to reproduce the behavior:

  1. Attempt to import BlobProperties, from azure.storage.blob import BlobProperties
  2. See the error: ImportError: cannot import name 'SerializationError' from 'azure.core.exceptions' (/databricks/python/lib/python3.8/site-packages/azure/core/exceptions.py)

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:20 (6 by maintainers)

github_iconTop GitHub Comments

7reactions
odoo-ce-modulescommented, Jul 6, 2022

"that started happening out of the blue, everything was working fine for quite some time. “

Completely unreliable. How on earth do things work fine for quite some time … then WITHOUT USER CODE CHANGES, behind the scenes, you start screwing up everything??

Pinning the version is not the fix. Tell us what you changed for transparency sake. Stop treating this as if the dev screwed up. Obviously YOU changed something. I had the same experience. No code change. Then suddenly one day redeploying the same code with only a minor config update, everything is broke and now requires version pinning?? Running stuff on your platform is a real crap-shoot.

Thank goodness most of my customers are on AWS.

5reactions
lmazuelcommented, Jun 10, 2022

msrest 0.7.0 requires azure-core 1.24.0. If anyone pins azure-core, but not msrest, you may end up in a scenario were pip will upgrade only msrest, but not azure-core. This is a pip update problem, as we didn’t do a mistake in our setup.py of msrest

The recommended approach is to either pin to msrest 0.6.21 and any version of azure-core, or to ping to msrest 0.7.0 + azure-core 1.24.0. The last one is the prefered one, as you get more updated packages.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cannot import name SerializationError' error after the change ...
# The error happens due to incorrect pip package version has upgraded during the CHG0109659. - azure-common 1.1.28 - azure-core 1.21.1 - azure- ......
Read more >
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 >
cannot import name 'SerializationError' from 'azure.core ...
ImportError : cannot import name 'SerializationError' from 'azure.core.exceptions' #24765. $ python3 -V Python 3.8.10 $ pip3 -V pip 20.0.2 from ...
Read more >
msrest.serialization — Azure SDK for Python 2.0.0 ... - NET
ElementTree as ET import isodate from typing import Dict, Any from .exceptions import ( ValidationError, SerializationError, DeserializationError, ...
Read more >
Troubleshoot Python errors in Azure Functions - Microsoft Learn
"Exception: ModuleNotFoundError: No module named 'module_name'." This error occurs when a Python function app fails to load a Python module. The ...
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