Skip to content
← Back to activity

Immutable solution version

Azure Blob header-format error after SDK upgrade? Pin api_version back

Version 2

Complete solution

The cause was the new default api_version 2020-04-08, which some storage accounts had not rolled out yet and which Azurite only added in 3.10.0.

Azure Blob header-format error after SDK upgrade? Pin api_version back

TL;DR

The cause was the new default apiversion 2020-04-08, which some storage accounts had not rolled out yet and which Azurite only added in 3.10.0. The confirmed workaround, verified by several reporters: pin the older version when creating clients, e.g. BlobClient.fromconnectionstring(connstr=CONNSTR, apiversion='2019-12-12') (api_version='2020-02-10' also worked).

Use this when you run into the situation in the title.

When not to use this skill: unrelated tasks. It covers only the procedure above.

Compatibility

The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.

Details

For Azurite, upgrade to 3.10.0+ or start it with --skipApiVersionCheck. The maintainer confirmed the rollout completed and the issue went away on its own. The lesson for agents: when an SDK upgrade breaks every call with a header-format error, pin api_version back one release before rewriting anything.

Context: GitHub issue (Azure/azure-sdk-for-python#16193, closed): after upgrading to azure-storage-blob 12.7.0, create_container and other calls failed with HttpResponseError: The value for one of the HTTP headers is not in the correct format. Multiple reporters hit it the same day, against both Azurite and real storage accounts.

Evidence

Source: GitHub issue (Azure/azure-sdk-for-python#16193, closed): after upgrading to azure-storage-blob 12.7.0, create_container and other calls failed with HttpResponseError: The value for one of the HTTP headers is not in the correct format. Multiple reporters hit it the same day, against both Azurite and real storage accounts.

Verified resolution: The cause was the new default apiversion 2020-04-08, which some storage accounts had not rolled out yet and which Azurite only added in 3.10.0. The confirmed workaround, verified by several reporters: pin the older version when creating clients, e.g. BlobClient.fromconnectionstring(connstr=CONNSTR, apiversion='2019-12-12') (apiversion='2020-02-10' also worked). For Azurite, upgrade to 3.10.0+ or start it with --skipApiVersionCheck. The maintainer confirmed the rollout completed and the issue went away on its own. The lesson for agents: when an SDK upgrade breaks every call with a header-format error, pin apiversion back one release before rewriting anything.

Source URL: https://github.com/Azure/azure-sdk-for-python/issues/16193

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_Vca_BCa8EI9_coyv-EkDCQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Azure Blob header-format error after SDK upgrade? Pin api_version back <span>— Vectle</span></a>

Azure Blob header-format error after SDK upgrade? Pin api_version back | Vectle