Comments (6)
Thank you for your feedback. Tagging and routing to the team member best able to assist.
from azure-sdk-for-python.
Hi @sakshi1989 , can you try with passing parameter content_type
?
print(type(f))
poller = document_intelligence_client.begin_analyze_document(model_id="prebuilt-layout",
analyze_request=f,
output_content_format="markdown",
content_type="application/octet-stream",)
Or passing in a AnalyzeDocumentRequest
:
print(type(f))
poller = document_intelligence_client.begin_analyze_document(model_id="prebuilt-layout",
AnalyzeDocumentRequest(bytes_source=f.read()),
output_content_format="markdown",)
Thanks
from azure-sdk-for-python.
Thanks @YalinLi0312 for your reply. Your first suggestion works, but not the second one. With the second one I am receiving below error -
TypeError: cannot pickle '_io.BufferedReader' object
Also, I would like to point out that in documentation there is nowhere mentioned to have the parameter content_type="application/octet-stream"
, it would be good to mention the same in the documentation so that users don't run into the same error. in the example, yes this parameter is mentioned but not in the documentation.
from azure-sdk-for-python.
Hi @sakshi1989. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.
from azure-sdk-for-python.
Hi @sakshi1989, thanks for the feedback! We'll mention the type in our documentation.
For the second one, it should pass f.read()
instead. I updated in the previous comment, please try it again.
from azure-sdk-for-python.
model_id="prebuilt-layout", AnalyzeDocumentRequest(bytes_source=f.read()), output_content_format="markdown",
Hi @YalinLi0312 , thank you for your quick response on the issue. Yes, now both the options are working.
from azure-sdk-for-python.
Related Issues (20)
- Enable tests for healthinsights projects again
- Cloud Shell ManagedIdentitySource should throw if a user-assigned managed identity clientID or resourceID is supplied
- serial_console_client.serial_ports.list is returning an empty list on a Bootdiagnostics enabled Azure VM HOT 8
- azure.identity.aio.CertificateCredential constructor does not support x5c via send_certificate_chain HOT 3
- No documentation for HTTPRequest class HOT 1
- Port AuthenticationRecord related caching doc HOT 1
- [Identity] AzurePipelinesCredential parameterless constructor and add to DAC HOT 1
- [Identity] Create a new credential to support FIC in Github Actions HOT 1
- [ISSUE]: __init__() missing 1 required positional argument: 'certificate_path' HOT 4
- The latest azure.mgmt.rdbms returns publicNetworkAccess = Enabled whereas latest az cli returns publicNetworkAccess = Disabled HOT 5
- Unable to upload entire file content to ADLS GEN2 using Python SDK HOT 6
- Test samples step broken after switching to UseFederatedAuth HOT 1
- azure-ai-anomalydetector needs typing updates for mypy version 1.9.0 HOT 1
- azure-identity needs linting updates for pylint version 3.1.0 HOT 1
- send_certificate_chain is missing in get_client_credential from OnBehalfOfCredential class in Azure.Idenitty module. HOT 2
- Issue with Python SDK to create Azure VM HOT 4
- `JSONDecodeError: Unterminated string` when handling response from paginated endpoint HOT 2
- Cannot create a new graph database with auto-scaling enabled using CosmosClient HOT 1
- Getting Policy Name using its Definition Id
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-sdk-for-python.