Troubleshoot "cannot import name 'SerializationError'"

Important

This article provides information on using the Azure Machine Learning SDK v1. SDK v1 is deprecated as of March 31, 2025. Support for it will end on June 30, 2026. You can install and use SDK v1 until that date. Your existing workflows using SDK v1 will continue to operate after the end-of-support date. However, they could be exposed to security risks or breaking changes in the event of architectural changes in the product.

We recommend that you transition to the SDK v2 before June 30, 2026. For more information on SDK v2, see What is Azure Machine Learning CLI and Python SDK v2? and the SDK v2 reference.

When using Azure Machine Learning, you might receive one of the following errors:

  • cannot import name 'SerializationError'
  • cannot import name 'SerializationError' from 'azure.core.exceptions'

This error might occur when using an Azure Machine Learning environment. For example, when submitting a training job or using AutoML.

Cause

This problem is caused by a bug in the Azure Machine Learning SDK version 1.42.0.

Resolution

Update the affected environment to use SDK version 1.42.0.post1 or greater. For a local development environment or compute instance, use the following command:

pip install azureml-sdk[automl,explain,notebooks]>=1.42.0

For more information on updating an Azure Machine Learning environment (for training or deployment), see the following articles:

To verify the version of your installed SDK, use the following command:

pip show azureml-core

Next steps

For more information on updating an Azure Machine Learning environment (for training or deployment), see the following articles: