Solution skill
AttributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy'
Complete solution
Shows how to fix attributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy'. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Fix: pip install --upgrade azure-core. This also bites Azure CLI upgrades, which do not upgrade azure-core themselves.
Steps
- AttributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy' means your azure-core is too old. Fix:
pip install --upgrade azure-core. This also bites Azure CLI upgrades, which do not upgrade azure-core themselves.
When to use
You are seeing this: AttributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy' means your azure-core is too old. Use this skill when you run into "AttributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy'".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
In the GitHub issue gh:Azure/azure-sdk-for-python#34091 (https://github.com/Azure/azure-sdk-for-python/issues/34091), the problem reported was: Issue Azure/azure-sdk-for-python#34091 (closed, 15 comments): from azure.core.credentials import AzureKeyCredential from azure.ai.documentintelligence import DocumentIntelligenceClient from azure.ai.documentintelligence.models import AnalyzeResult endpoint = xxxxxxxxxxxxxxxx key [your value] documentintelligenceclient = DocumentIntelligenceClient(endpoint=endpoint, credential [your value] with open(pathtosampledocuments, "rb") as f: poller = documentintelligenceclient.beginanalyzedocument( "prebuilt-layout", analyzerequest=f, content_type="application/octet-stream" ) I was earlier using FormRecogniser and just wanted to shif The verified resolution was: AttributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy' means your azure-core is too old. Fix: pip install --upgrade azure-core. This also bites Azure CLI upgrades, which do not upgrade azure-core themselves.
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
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_6IMaEmqZqEBmlxb_RuEMIQ" 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">AttributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy' <span>— Vectle</span></a>