Azure / Azure/azure-sdk-for-python

[DocumentIntelligence] JSON error when calling begin_analyze_document

Aperta
#43,388 3 commenti 0 reazioni 1 assegnatario Rivendicata da @yungshinlintw Vedi su GitHub
Client customer-reported Document Intelligence needs-team-attention question
Lingua principale
Python
Stelle
5.6k
Fork
3.4k
Merge medio
2g
PR unite (30g)
217

Descrizione

- **Package Name**: azure_ai_documentintelligence
- **Package Version**: 1.0.2
- **Operating System**: Win 11
- **Python Version**: 3.9

**Describe the bug**
Reading a PDF document triggers the following error:
**JSONDecodeError: Expecting value**

Though, the code is taken from the documentation. I precise that the code is not run on Azure but locally on a Windows system.

**To Reproduce**
```
from azure.core.credentials import AzureKeyCredential
from azure.ai.documentintelligence import DocumentIntelligenceClient

endpoint = "***"
key = "***"

client = DocumentIntelligenceClient(endpoint=endpoint, credential=AzureKeyCredential(key))

with open("my_file.pdf", "rb") as f:
poller = client.begin_analyze_document("prebuilt-read", body=f)
```
**Expected behavior**
I expect the code to run properly.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.