Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
TamGB opened this issue Jun 8, 2022 · 26 comments
Closed
Assignees
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@TamGB
Copy link

TamGB commented Jun 8, 2022

  • 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)
@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jun 8, 2022
@azure-sdk azure-sdk added Azure.Core Client This issue points to a problem in the data-plane of the library. needs-team-triage Workflow: This issue needs the team to triage. labels Jun 8, 2022
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jun 8, 2022
@xiangyan99 xiangyan99 removed the needs-team-triage Workflow: This issue needs the team to triage. label Jun 8, 2022
@xiangyan99 xiangyan99 self-assigned this Jun 8, 2022
@lmazuel
Copy link
Member

lmazuel commented Jun 8, 2022

Hi @TamGB , could you please clarify the version of msrest installed in your environment, and share the more complete stacktrace if you have one. Thanks!

@lmazuel lmazuel self-assigned this Jun 8, 2022
@kapoor1992
Copy link

kapoor1992 commented Jun 8, 2022

We are also seeing this issue pop up and we're on azure-core==1.14.0.

We didn't have msrest in dependencies and so we were upgraded to 0.7.0 which released yesterday (June 7, 2022). Pinning to 0.6.21 did the trick.

@xiangyan99 xiangyan99 added the issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. label Jun 10, 2022
@ghost
Copy link

ghost commented Jun 10, 2022

Hi @TamGB. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

@lmazuel
Copy link
Member

lmazuel commented 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.

@teemujoel
Copy link

Hi,

Just a side note, azure-keyvault-secrets library was also upped on June 7, which caused my code to crash with same Serialization Error as with azure-core described above. When azure-keyvault-secrets was pinned at 4.4.0, the problem disappeared.

@ghost
Copy link

ghost commented Jun 20, 2022

Hi @TamGB, since you haven’t asked that we “/unresolve” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve” to reopen the issue.

@ghost ghost closed this as completed Jun 20, 2022
ChristinaSka referenced this issue in ChristinaSka/Azure-Social-Media-Analytics-Solution-Accelerator Jun 20, 2022
@shadisalehs
Copy link

Hi, I am having the same issue, deploying endpoint to aks, my env is as follows:
`channels:

  • anaconda
  • conda-forge
  • pytorch
    dependencies:
  • python=3.7.9
  • pip=20.2.4
  • pip:
    • azureml-core==1.41.0.post3
    • azureml-mlflow==1.41.0
    • azureml-pipeline-core==1.41.0
    • azureml-telemetry==1.41.0
    • azureml-interpret==1.41.0
    • azureml-responsibleai==1.41.0
    • azureml-automl-core==1.41.1.post1
    • azureml-automl-runtime==1.41.1
    • azureml-train-automl-client==1.41.0
    • azureml-train-automl-runtime==1.41.1
    • azureml-dataset-runtime==1.41.0
    • azureml-defaults==1.41.0
    • azureml-monitoring==0.1.0a21
    • inference-schema
    • mpi4py==3.1.3
    • click<8.0.0
    • pystan==2.19.1.1
    • pytorch-transformers==1.0.0
    • spacy==2.1.8
    • 'https://aka.ms/automl-resources/packages/en_core_web_sm-2.1.0.tar.gz'
    • py-cpuinfo==5.0.0
    • boto3==1.15.18
    • botocore==1.18.18
    • joblib==0.14.1
    • cloudpickle==1.6.0
  • numpy~=1.18.0
  • scikit-learn==0.22.1
  • pandas~=1.1.5
  • py-xgboost==1.3.3
  • fbprophet==0.7.1
  • holidays==0.10.3
  • setuptools-git
  • pytorch=1.4.0
  • cudatoolkit=10.0.130
  • 'psutil>5.0.0,<6.0.0'
    name: project_environment
    The error I am getting is: "message": "Error in entry script, ImportError: cannot import name 'SerializationError' from 'azure.core.exceptions'`

I tried to add mrest==0.6.21 to the env, but building the image field (pip could not find the package).
Any idea how to solve this?
Thanks

@kapoor1992
Copy link

@shadisalehs You have a typo. The library is msrest, not mrest.

@odoo-ce-modules
Copy link

odoo-ce-modules commented Jul 5, 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.

@kapoor1992
Copy link

I uh.. respectfully agree with @odoo-ce-modules that we need to be told the dependency as the library is imported.

@eddielin0926
Copy link

My azure-core version is 1.25.0 and msrest version is 0.7.1, but I still got the error. Is there any possible solution that I can follow?

@xiangyan99
Copy link
Member

@eddielin0926 could you share more information about your environment?

@eddielin0926
Copy link

eddielin0926 commented Aug 24, 2022

@xiangyan99 Sure!
The list of the packages in my environment is quite long.

Detail
$ python3 -V
Python 3.8.10
$ pip3 -V
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
$ pip3 list
Package                                          Version
------------------------------------------------ --------------------
actionlib                                        1.13.2
adal                                             1.2.2
aiohttp                                          3.6.2
angles                                           1.9.13
applicationinsights                              0.11.9
argcomplete                                      1.8.1
async-timeout                                    3.0.1
attrs                                            19.3.0
autobahn                                         17.10.1
Automat                                          0.8.0
azure                                            4.0.0
azure-ai-textanalytics                           1.0.0b1
azure-appconfiguration                           1.0.0
azure-applicationinsights                        0.1.0
azure-batch                                      8.0.0
azure-cli                                        2.0.81
azure-cli-core                                   2.0.81
azure-cli-telemetry                              1.0.4
azure-cognitiveservices-anomalydetector          0.2.0
azure-cognitiveservices-formrecognizer           0.1.0
azure-cognitiveservices-knowledge-qnamaker       0.1.0
azure-cognitiveservices-language-luis            0.5.0
azure-cognitiveservices-language-spellcheck      2.0.0
azure-cognitiveservices-language-textanalytics   0.2.0
azure-cognitiveservices-personalizer             0.1.0
azure-cognitiveservices-search-autosuggest       0.2.0
azure-cognitiveservices-search-customimagesearch 0.2.0
azure-cognitiveservices-search-customsearch      0.3.0
azure-cognitiveservices-search-entitysearch      2.0.0
azure-cognitiveservices-search-imagesearch       2.0.0
azure-cognitiveservices-search-newssearch        2.0.0
azure-cognitiveservices-search-videosearch       2.0.0
azure-cognitiveservices-search-visualsearch      0.2.0
azure-cognitiveservices-search-websearch         2.0.0
azure-cognitiveservices-vision-computervision    0.5.0
azure-cognitiveservices-vision-contentmoderator  1.0.0
azure-cognitiveservices-vision-customvision      1.0.0
azure-cognitiveservices-vision-face              0.4.0
azure-common                                     1.1.24
azure-core                                       1.25.0
azure-cosmos                                     3.1.1
azure-cosmosdb-table                             1.0.6
azure-datalake-store                             0.0.48
azure-devops                                     0.17.0
azure-digitaltwins-core                          1.2.0
azure-eventgrid                                  1.3.0
azure-eventhub                                   5.0.0
azure-eventhub-checkpointstoreblob               1.0.0
azure-eventhub-checkpointstoreblob-aio           1.0.0
azure-functions-devops-build                     0.0.22
azure-graphrbac                                  0.61.1
azure-identity                                   1.2.0
azure-keyvault                                   4.0.0
azure-keyvault-certificates                      4.0.0
azure-keyvault-keys                              4.1.0b1
azure-keyvault-secrets                           4.1.0b1
azure-loganalytics                               0.1.0
azure-mgmt                                       5.0.0a1
azure-mgmt-advisor                               3.0.0
azure-mgmt-alertsmanagement                      0.2.0rc2
azure-mgmt-apimanagement                         0.1.0
azure-mgmt-appconfiguration                      0.3.0
azure-mgmt-applicationinsights                   0.2.0
azure-mgmt-appplatform                           0.1.0
azure-mgmt-attestation                           0.1.0
azure-mgmt-authorization                         0.60.0
azure-mgmt-automation                            0.1.1
azure-mgmt-azurestack                            0.1.0
azure-mgmt-batch                                 7.0.0
azure-mgmt-billing                               0.2.0
azure-mgmt-botservice                            0.2.0
azure-mgmt-cdn                                   4.1.0rc1
azure-mgmt-cognitiveservices                     5.0.0
azure-mgmt-commerce                              1.0.1
azure-mgmt-compute                               10.0.0
azure-mgmt-consumption                           3.0.0
azure-mgmt-containerinstance                     1.5.0
azure-mgmt-containerregistry                     3.0.0rc8
azure-mgmt-containerservice                      8.2.0
azure-mgmt-cosmosdb                              0.11.0
azure-mgmt-costmanagement                        0.1.0
azure-mgmt-databoxedge                           0.1.0
azure-mgmt-databricks                            0.1.0
azure-mgmt-datafactory                           0.8.0
azure-mgmt-datalake-analytics                    0.6.0
azure-mgmt-datalake-store                        0.5.0
azure-mgmt-datamigration                         4.0.0
azure-mgmt-datashare                             0.1.0rc1
azure-mgmt-deploymentmanager                     0.2.0
azure-mgmt-devspaces                             0.2.0
azure-mgmt-devtestlabs                           4.0.0
azure-mgmt-dns                                   3.0.0
azure-mgmt-documentdb                            0.1.3
azure-mgmt-edgegateway                           0.1.0
azure-mgmt-eventgrid                             3.0.0rc4
azure-mgmt-eventhub                              3.0.0
azure-mgmt-frontdoor                             0.3.0
azure-mgmt-hanaonazure                           0.12.0
azure-mgmt-hdinsight                             1.4.0
azure-mgmt-healthcareapis                        0.1.0
azure-mgmt-hybridcompute                         0.1.1
azure-mgmt-imagebuilder                          0.3.0
azure-mgmt-iotcentral                            2.0.0
azure-mgmt-iothub                                0.10.0
azure-mgmt-iothubprovisioningservices            0.2.0
azure-mgmt-keyvault                              2.0.0
azure-mgmt-kusto                                 0.5.0
azure-mgmt-labservices                           0.1.1
azure-mgmt-loganalytics                          0.2.0
azure-mgmt-logic                                 4.0.0rc2
azure-mgmt-machinelearningcompute                0.4.1
azure-mgmt-machinelearningservices               0.1.0
azure-mgmt-maintenance                           0.1.0
azure-mgmt-managedservices                       1.0.0
azure-mgmt-managementgroups                      0.2.0
azure-mgmt-managementpartner                     0.1.1
azure-mgmt-maps                                  0.1.0
azure-mgmt-marketplaceordering                   0.2.1
azure-mgmt-media                                 2.1.0
azure-mgmt-mixedreality                          0.1.0
azure-mgmt-monitor                               0.7.0
azure-mgmt-msi                                   1.0.0
azure-mgmt-netapp                                0.8.0
azure-mgmt-network                               9.0.0
azure-mgmt-notificationhubs                      2.1.0
azure-mgmt-operationsmanagement                  0.1.0
azure-mgmt-peering                               0.1.0rc2
azure-mgmt-policyinsights                        0.4.0
azure-mgmt-powerbidedicated                      0.1.0
azure-mgmt-powerbiembedded                       2.0.0
azure-mgmt-privatedns                            0.1.0
azure-mgmt-rdbms                                 1.9.0
azure-mgmt-recoveryservices                      0.4.0
azure-mgmt-recoveryservicesbackup                0.6.0
azure-mgmt-redis                                 7.0.0rc1
azure-mgmt-relay                                 0.2.0
azure-mgmt-reservations                          0.7.0
azure-mgmt-resource                              8.0.0
azure-mgmt-resourcegraph                         2.0.0
azure-mgmt-scheduler                             2.0.0
azure-mgmt-search                                2.1.0
azure-mgmt-security                              0.3.0
azure-mgmt-serialconsole                         0.1.0
azure-mgmt-servermanager                         2.0.0
azure-mgmt-servicebus                            0.6.0
azure-mgmt-servicefabric                         0.4.0
azure-mgmt-signalr                               0.3.0
azure-mgmt-sql                                   0.16.0
azure-mgmt-sqlvirtualmachine                     0.5.0
azure-mgmt-storage                               7.1.0
azure-mgmt-storagecache                          0.2.0
azure-mgmt-storagesync                           0.2.0
azure-mgmt-subscription                          0.5.0
azure-mgmt-timeseriesinsights                    0.1.0
azure-mgmt-trafficmanager                        0.51.0
azure-mgmt-vmwarecloudsimple                     0.2.0
azure-mgmt-web                                   0.44.0
azure-multiapi-storage                           0.2.4
azure-servicebus                                 0.50.2
azure-servicefabric                              7.0.0.0
azure-servicemanagement-legacy                   0.20.7
azure-storage-blob                               1.4.0
azure-storage-common                             1.4.0
azure-storage-file                               1.4.0
azure-storage-file-datalake                      12.0.0b7
azure-storage-file-share                         12.0.1
azure-storage-queue                              1.4.0
azure-template                                   0.0.1
base-local-planner                               1.17.2
bcrypt                                           3.1.7
blinker                                          1.4
bondpy                                           1.8.6
breezy                                           3.0.2
camera-calibration                               1.16.0
camera-calibration-parsers                       1.12.0
catkin                                           0.8.10
catkin-pkg                                       0.5.2
catkin-pkg-modules                               0.5.2
cbor                                             1.0.0
certifi                                          2022.6.15
cffi                                             1.14.0
chardet                                          3.0.4
charset-normalizer                               2.1.1
Click                                            7.0
cloud-init                                       22.2
colorama                                         0.4.3
command-not-found                                0.3
configobj                                        5.0.6
constantly                                       15.1.0
controller-manager                               0.19.5
controller-manager-msgs                          0.19.5
cryptography                                     2.8
cupshelpers                                      1.0
cv-bridge                                        1.16.0
cycler                                           0.10.0
Cython                                           0.29.14
dbus-python                                      1.2.16
defer                                            1.0.6
defusedxml                                       0.6.0
Deprecated                                       1.2.7
diagnostic-analysis                              1.11.0
diagnostic-common-diagnostics                    1.11.0
diagnostic-updater                               1.11.0
distro                                           1.4.0
distro-info                                      0.23ubuntu1
docutils                                         0.16
dulwich                                          0.19.15
dynamic-reconfigure                              1.7.3
empy                                             3.3.2
entrypoints                                      0.3
fabric                                           2.5.0
fastimport                                       0.9.8
gazebo-plugins                                   2.9.2
gazebo-ros                                       2.9.2
gencpp                                           0.6.5
geneus                                           3.0.0
genlisp                                          0.4.18
genmsg                                           0.5.16
gennodejs                                        2.0.2
genpy                                            0.6.15
gpg                                              1.13.1-unknown
httplib2                                         0.14.0
humanfriendly                                    4.18
hyperlink                                        19.0.0
idna                                             3.3
image-geometry                                   1.16.0
importlib-metadata                               1.5.0
incremental                                      16.10.1
interactive-markers                              1.12.0
invoke                                           1.3.0
isodate                                          0.6.1
javaproperties                                   0.6.0
Jinja2                                           2.10.1
jmespath                                         0.9.4
joint-state-publisher                            1.15.1
joint-state-publisher-gui                        1.15.1
jsmin                                            2.2.2
jsondiff                                         1.1.1
jsonpatch                                        1.22
jsonpointer                                      2.0
jsonschema                                       3.2.0
keyring                                          18.0.1
kiwisolver                                       1.0.1
knack                                            0.6.3
language-selector                                0.1
laser-geometry                                   1.6.7
launchpadlib                                     1.10.13
lazr.restfulclient                               0.14.2
lazr.uri                                         1.0.3
lz4                                              3.0.2+dfsg
macaroonbakery                                   1.3.1
MarkupSafe                                       1.1.0
matplotlib                                       3.1.2
message-filters                                  1.15.14
mock                                             3.0.5
more-itertools                                   4.2.0
mpi4py                                           3.0.3
msal                                             1.1.0
msal-extensions                                  0.1.3
msrest                                           0.7.1
msrestazure                                      0.6.2
multidict                                        4.7.3
netifaces                                        0.10.4
nose                                             1.3.7
numpy                                            1.17.4
oauthlib                                         3.2.0
olefile                                          0.46
paramiko                                         2.6.0
pbr                                              5.4.5
pexpect                                          4.6.0
Pillow                                           7.0.0
pip                                              20.0.2
pkginfo                                          1.4.2
ply                                              3.11
portalocker                                      1.5.1
protobuf                                         3.6.1
psutil                                           5.5.1
py-ubjson                                        0.14.0
pyasn1                                           0.4.2
pyasn1-modules                                   0.2.1
pycairo                                          1.16.2
pycparser                                        2.19
pycryptodomex                                    3.6.1
pycups                                           1.9.73
pydot                                            1.4.1
PyGithub                                         1.43.7
Pygments                                         2.3.1
PyGObject                                        3.36.0
PyHamcrest                                       1.9.0
PyJWT                                            1.7.1
pymacaroons                                      0.13.0
PyNaCl                                           1.3.0
PyOpenGL                                         3.1.0
pyOpenSSL                                        19.0.0
pyparsing                                        2.4.6
pyparted                                         3.11.2
pypng                                            0.0.20
PyQRCode                                         1.2.1
PyQt5                                            5.14.1
pyRFC3339                                        1.1
pyrsistent                                       0.15.5
pyserial                                         3.4
python-apt                                       2.0.0+ubuntu0.20.4.7
python-dateutil                                  2.7.3
python-debian                                    0.1.36ubuntu1
python-gitlab                                    2.0.1
python-gnupg                                     0.4.5
python-qt-binding                                0.4.4
python-snappy                                    0.5.3
PyTrie                                           0.2
pytz                                             2019.3
pyxdg                                            0.26
PyYAML                                           5.3.1
qt-dotgraph                                      0.4.2
qt-gui                                           0.4.2
qt-gui-cpp                                       0.4.2
qt-gui-py-common                                 0.4.2
requests                                         2.28.1
requests-oauthlib                                1.3.1
requests-unixsocket                              0.2.0
resource-retriever                               1.12.7
roman                                            2.0.0
rosbag                                           1.15.14
rosboost-cfg                                     1.15.8
rosclean                                         1.15.8
roscreate                                        1.15.8
rosdep                                           0.22.1
rosdep-modules                                   0.22.1
rosdistro                                        0.9.0
rosdistro-modules                                0.9.0
rosgraph                                         1.15.14
rosinstall                                       0.7.8
rosinstall-generator                             0.1.22
roslaunch                                        1.15.14
roslib                                           1.15.8
roslint                                          0.12.0
roslz4                                           1.15.14
rosmake                                          1.15.8
rosmaster                                        1.15.14
rosmsg                                           1.15.14
rosnode                                          1.15.14
rosparam                                         1.15.14
rospkg                                           1.4.0
rospkg-modules                                   1.4.0
rospy                                            1.15.14
rospy-message-converter                          0.5.8
rosservice                                       1.15.14
rostest                                          1.15.14
rostopic                                         1.15.14
rosunit                                          1.15.8
roswtf                                           1.15.14
rqt-action                                       0.4.9
rqt-bag                                          0.5.1
rqt-bag-plugins                                  0.5.1
rqt-console                                      0.4.11
rqt-dep                                          0.4.12
rqt-graph                                        0.4.14
rqt-gui                                          0.5.3
rqt-gui-py                                       0.5.3
rqt-image-view                                   0.4.16
rqt-launch                                       0.4.9
rqt-logger-level                                 0.4.11
rqt-moveit                                       0.5.10
rqt-msg                                          0.4.10
rqt-nav-view                                     0.5.7
rqt-plot                                         0.4.13
rqt-pose-view                                    0.5.11
rqt-publisher                                    0.4.10
rqt-py-common                                    0.5.3
rqt-py-console                                   0.4.10
rqt-reconfigure                                  0.5.5
rqt-robot-dashboard                              0.5.8
rqt-robot-monitor                                0.5.14
rqt-robot-steering                               0.5.12
rqt-runtime-monitor                              0.5.9
rqt-rviz                                         0.7.0
rqt-service-caller                               0.4.10
rqt-shell                                        0.4.11
rqt-srv                                          0.4.9
rqt-tf-tree                                      0.6.3
rqt-top                                          0.4.10
rqt-topic                                        0.4.13
rqt-web                                          0.4.10
rviz                                             1.14.14
scp                                              0.13.0
SecretStorage                                    2.3.1
sensor-msgs                                      1.13.1
service-identity                                 18.1.0
setuptools                                       45.2.0
simplejson                                       3.16.0
sip                                              4.19.21
six                                              1.16.0
smach                                            2.5.0
smach-ros                                        2.5.0
smclib                                           1.8.6
sos                                              4.3
ssh-import-id                                    5.10
sshtunnel                                        0.1.4
systemd-python                                   234
tabulate                                         0.8.6
tf                                               1.13.2
tf-conversions                                   1.13.2
tf2-geometry-msgs                                0.7.5
tf2-kdl                                          0.7.5
tf2-py                                           0.7.5
tf2-ros                                          0.7.5
topic-tools                                      1.15.14
Twisted                                          18.9.0
txaio                                            2.10.0
typing-extensions                                4.3.0
u-msgpack-python                                 2.1
uamqp                                            1.2.6
ubuntu-advantage-tools                           27.9
ufw                                              0.36
unattended-upgrades                              0.1
urllib3                                          1.26.12
vcstools                                         0.1.42
vsts-cd-manager                                  1.0.2
wadllib                                          1.3.3
WALinuxAgent                                     2.2.46
websocket-client                                 0.53.0
wheel                                            0.34.2
wrapt                                            1.11.2
wsaccel                                          0.6.2
wstool                                           0.1.18
xacro                                            1.14.13
xmltodict                                        0.12.0
yarl                                             1.4.2
zipp                                             1.0.0
zope.interface                                   4.7.1

@xiangyan99
Copy link
Member

@eddielin0926 I saw 403 forbidden. :(

@eddielin0926
Copy link

@xiangyan99 Sorry, that's my fault. Can you please try the same link again?

@xiangyan99
Copy link
Member

@eddielin0926 Thanks for sharing. It looks to me your environment is messed up. E.g. azure library is already deprecated and is not fully compatible with other libraries.

Could you try creating a new virtual environment and install those packages again?

@eddielin0926
Copy link

@xiangyan99 Thanks! A new virtual environment does help me fix the problem.👍

@yeamusic21
Copy link

yeamusic21 commented Nov 15, 2022

Problem Details

I'm getting the same error. We're running Databricks jobs from a Data Factory pipeline and the pipeline works for days and weeks, and then out of the blue we get this error. Then it starts running successfully again.

Notebook Details

The notebook is running sklearn + Azure AutoML models within a Spark pipeline by wrapping the inference work within a Pandas UDF.

Error / Program Details

Note that I can't share the code because it's company proprietary information. But also note again that the notebook/code works for days and weeks, and then out of the blue we get this error.

Driver: Standard_DS3_v2
Workers: Standard_DS3_v2 · 1-8 workers
Databricks Runtime: 7.3 LTS (includes Apache Spark 3.0.1, Scala 2.12)
Notebook Dependencies:
`dbutils.library.installPyPI("numpy", version="1.16.2")
dbutils.library.installPyPI("pandas", version="0.23.4")
dbutils.library.installPyPI("scikit-learn", version="0.20.3")
dbutils.library.installPyPI("xgboost", version="0.90")

dbutils.library.installPyPI("azure-common", version="1.1.25")
dbutils.library.installPyPI("azure-core", version="1.8.1")
dbutils.library.installPyPI("azure-graphrbac", version="0.61.1")
dbutils.library.installPyPI("azure-identity", version="1.2.0")
dbutils.library.installPyPI("azure-mgmt-authorization", version="0.61.0")
dbutils.library.installPyPI("azure-mgmt-containerregistry", version="2.8.0")
dbutils.library.installPyPI("azure-mgmt-core", version="1.2.0")
dbutils.library.installPyPI("azure-mgmt-keyvault", version="7.0.0")
dbutils.library.installPyPI("azure-mgmt-resource", version="10.2.0")
dbutils.library.installPyPI("azure-mgmt-storage", version="16.0.0")
dbutils.library.installPyPI("azureml-automl-core", version="1.12.0")
dbutils.library.installPyPI("azureml-automl-runtime", version="1.12.0.post1")
dbutils.library.installPyPI("azureml-contrib-notebook", version="1.12.0")
dbutils.library.installPyPI("azureml-core", version="1.12.0.post2")
dbutils.library.installPyPI("azureml-dataprep", version="2.0.10")
dbutils.library.installPyPI("azureml-dataprep-native", version="20.1.1")
dbutils.library.installPyPI("azureml-dataset-runtime", version="1.12.0")
dbutils.library.installPyPI("azureml-defaults", version="1.12.0")
dbutils.library.installPyPI("azureml-explain-model", version="1.12.0")
dbutils.library.installPyPI("azureml-interpret", version="1.12.0")
dbutils.library.installPyPI("azureml-model-management-sdk", version="1.0.1b6.post1")
dbutils.library.installPyPI("azureml-pipeline", version="1.12.0")
dbutils.library.installPyPI("azureml-pipeline-core", version="1.12.0")
dbutils.library.installPyPI("azureml-pipeline-steps", version="1.12.0")
dbutils.library.installPyPI("azureml-sdk", version="1.12.0")
dbutils.library.installPyPI("azureml-telemetry", version="1.12.0")
dbutils.library.installPyPI("azureml-train", version="1.12.0")
dbutils.library.installPyPI("azureml-train-automl", version="1.12.0")
dbutils.library.installPyPI("azureml-train-automl-client", version="1.12.0.post2")
dbutils.library.installPyPI("azureml-train-automl-runtime", version="1.12.0.post1")
dbutils.library.installPyPI("azureml-train-core", version="1.12.0")
dbutils.library.installPyPI("azureml-train-restclients-hyperdrive", version="1.12.0")
dbutils.library.installPyPI("azureml-widgets", version="1.12.0")

dbutils.library.restartPython() # Removes Python state, but some libraries might not work without calling this function`

Error:
Caused by: org.apache.spark.api.python.PythonException: 'ImportError: cannot import name 'SerializationError' from 'azure.core.exceptions'

Side Comments

"Completely unreliable. How on earth do things work fine for quite some time ... then WITHOUT USER CODE CHANGES, behind the scenes" things stop working. - I completely agree with these statements. It makes it hard to recommend Azure AutoML when the libraries it depends on are completely unreliable.

@xiangyan99 xiangyan99 assigned luigiw and unassigned lmazuel Nov 15, 2022
@xiangyan99
Copy link
Member

@yeamusic21 Thanks for your feedback.

@luigiw FYI.

@yeamusic21
Copy link

yeamusic21 commented Dec 14, 2022

Ran fine for weeks and then failed out of the blue again at 2022-12-14 02:35:26 EST.

Caused by: org.apache.spark.api.python.PythonException: 'ImportError: cannot import name 'SerializationError' from 'azure.core.exceptions'

See my original comment for environment details.

(I will keep posting each error until this is resolved to let you know that it's still relevant. Thanks 👍 )

@yeamusic21
Copy link

Ran fine for a couple more weeks and then failed out of the blue again at 2022-12-30 02:30:47 EST.

Caused by: org.apache.spark.api.python.PythonException: 'ImportError: cannot import name 'SerializationError' from 'azure.core.exceptions'

See my original comment for environment details.

(I will keep posting each error until this is resolved to let you know that it's still relevant. Thanks 👍 )

@otaviobertucini
Copy link

otaviobertucini commented Jan 14, 2023

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-identity 1.7.1
  • msrest 0.7.0

Downgrade the related pip packages version with recommended by SQLE Engineering. To do that, type the following commands in terminal:

pip install msrest==0.6.19
pip install azure-core==1.9.0
pip install azure-common==1.1.25
pip install azure-identity==1.5.0

@innayatullah
Copy link

Hi I'm having the same issue, but with a different package.
I'm importing azure-keyvault-secret but it is throwing the same error. I can not downgrade the related pip package as my required package is dependent on higher versions.
Following are my current packages
azure-common==1.1.28
azure-core==1.26.2
azure-keyvault-secrets==4.6.0
msrest==0.7.1

If I change azure-core to 1.9.0
I can not use azure-keyvault-secrets as it is dependent upon >=1.20.0

Is there anything that I can do here?

@frisedel
Copy link

frisedel commented Jan 23, 2023

Hi I'm having the same issue, but with a different package. I'm importing azure-keyvault-secret but it is throwing the same error. I can not downgrade the related pip package as my required package is dependent on higher versions. Following are my current packages azure-common==1.1.28 azure-core==1.26.2 azure-keyvault-secrets==4.6.0 msrest==0.7.1

If I change azure-core to 1.9.0 I can not use azure-keyvault-secrets as it is dependent upon >=1.20.0

Is there anything that I can do here?

same issue here, but I get past it by lowering msrest to 0.6.21.
in msrest 0.7.0 this feature was added "Replace SerializationError and DeserializationError in msrest.exceptions with those in azure.core #247"

msrest at pypi

I do not know yet if this gives me other errors down the line but for now this is a really ugly workaround since msrest now is fixed to 0.6.21

@yeamusic21
Copy link

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-identity 1.7.1
  • msrest 0.7.0

Downgrade the related pip packages version with recommended by SQLE Engineering. To do that, type the following commands in terminal:

pip install msrest==0.6.19 pip install azure-core==1.9.0 pip install azure-common==1.1.25 pip install azure-identity==1.5.0

Did you review my original post with install information? My packages are actually lower then the ones you recommended. Is your proposal that I upgrade mine to the specific package versions you listed?

@mclacore
Copy link

mclacore commented Mar 8, 2023

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-identity 1.7.1
  • msrest 0.7.0

Downgrade the related pip packages version with recommended by SQLE Engineering. To do that, type the following commands in terminal:

pip install msrest==0.6.19 pip install azure-core==1.9.0 pip install azure-common==1.1.25 pip install azure-identity==1.5.0

followed these directions, and now getting:

ImportError: cannot import name 'CaseInsensitiveEnumMeta' from 'azure.core' (/usr/lib/python3/dist-packages/azure/core/__init__.py)

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests