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:
To Reproduce Steps to reproduce the behavior:
- Attempt to import BlobProperties,
from azure.storage.blob import BlobProperties
- 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:
- Created a year ago
- Reactions:1
- Comments:20 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
"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.
msrest
0.7.0 requiresazure-core
1.24.0. If anyone pinsazure-core
, but notmsrest
, you may end up in a scenario were pip will upgrade onlymsrest
, but notazure-core
. This is a pip update problem, as we didn’t do a mistake in our setup.py ofmsrest
The recommended approach is to either pin to
msrest
0.6.21 and any version ofazure-core
, or to ping tomsrest
0.7.0 +azure-core
1.24.0. The last one is the prefered one, as you get more updated packages.