Azure / Azure/azure-sdk-for-python

Document Intelligence via ML Studio

Open
#43,069 1 comment 0 reactions 1 assignee Claimed by @yungshinlintw View on GitHub
Client customer-reported Document Intelligence needs-team-attention question
Dominant language
Python
Stars
5.6k
Forks
3.4k
Avg merge
1d 21h
Merged PRs (30d)
193

Description

- **Package Name**: azure-core
- **Package Version**: 1.35.1
- **Package Name**: azure-ai-documentintelligence
- **Package Version**: 1.0.2
- **Python Version**: 3.10

**Describe the bug**
Unable to create Document Intelligence Client given current versions of azure core and azure document intelligence.

---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In [119], line 7
5 endpoint = "XXX"
6 credential = AzureKeyCredential("XXX")
----> 7 document_intelligence_client = DocumentIntelligenceClient(endpoint, credential)

File ~/cluster-env/env/lib/python3.10/site-packages/azure/ai/documentintelligence/_patch.py:43, in DocumentIntelligenceClient.__init__(self, endpoint, credential, **kwargs)
35 def __init__(
36 self,
37 endpoint: str,
(...)
40 ) -> None:
41 # Patch the default polling interval to be 1s.
42 polling_interval = kwargs.pop("polling_interval", 1)
---> 43 super().__init__(
44 endpoint=endpoint,
45 credential=credential,
46 polling_interval=polling_interval,
47 **kwargs,
48 )

File ~/cluster-env/env/lib/python3.10/site-packages/azure/ai/documentintelligence/_client.py:65, in DocumentIntelligenceClient.__init__(self, endpoint, credential, **kwargs)
51 _policies = kwargs.pop("policies", None)
52 if _policies is None:
53 _policies = [
54 policies.RequestIdPolicy(**kwargs),
55 self._config.headers_policy,
56 self._config.user_agent_policy,
57 self._config.proxy_policy,
58 policies.ContentDecodePolicy(**kwargs),
59 self._config.redirect_policy,
60 self._config.retry_policy,
61 self._config.authentication_policy,
62 self._config.custom_hook_policy,
63 self._config.logging_policy,
64 policies.DistributedTracingPolicy(**kwargs),
---> 65 policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
66 self._config.http_logging_policy,
67 ]
68 self._client: PipelineClient = PipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
70 self._serialize = Serializer()

AttributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy'

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.