Computer Vision - Congnitive Service - Unable to upload file

Mooseheads_vik 1 Reputation point

I am exploring OCR and pretty new to this stuff. I have uploaded hand written text to the Azure storage container :

const printedTextSampleURL = '';

When I execute the sample program given at

I get the following error. Can someone please help me on this?

status: 400  

body: {
error: {
code: 'BadArgument',
message: 'Bad or unrecognizable request JSON or binary file.'

Azure Computer Vision
Azure Computer Vision
An Azure artificial intelligence service that analyzes content in images and video.
179 questions
Azure Cognitive Services
Azure Cognitive Services
A group of Azure artificial intelligence services and cognitive APIs that help build intelligent apps.
946 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 27,196 Reputation points Microsoft Employee

    @Mooseheads_vik I have tried to your file and the complete error message indicates the following`.

    body: {"error":{"code":"InvalidImage","message":"The file submitted couldn't be parsed. This can be due to one of the following reasons: the file format is not supported ( Supported formats include JPEG, PNG, BMP, PDF and TIFF), the file is corrupted or password protected."}},  
    headers: HttpHeaders { _headersMap: [Object] },  
    status: 400  

    I think this is because your URL or image is not publicly accessible in the storage container that is used. Please try to open up the image for anonymous access or provide a URL that can be accessible to public internet so the requested posted to the service can read your image and provide a response.

    For example, the same quickstart with this image URL works to provide a valid response.


    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

    No comments