MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.26k stars 21.43k forks source link

400 Client Error: Bad Request for url for CV OCR #60146

Closed sensoham closed 4 years ago

sensoham commented 4 years ago

Hi

I have created a subscription for Azure CV OCR to carry out text extraction from various text based images. I am using this guide to start out.

This works well for most images. So what I have tried to do is stack 2 images (first side by side, then one below the other) to create a single image and then send it to the given endpoint. When I do this, the image formed by cascading docs side by side returns a correct output. But the image formed by cascading docs vertically (one below another) returns a 400 Bad request.

The Traceback is follows

Traceback (most recent call last): File "azure_ocr.py", line 36, in <module> response.raise_for_status() File "C:\Users\user\Anaconda3\.....\requests\models.py", line 941, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://cvapp.cognitiveservices.azure.com/vision/v3.0/ocr?language=unk&detectOrientation=true

I should also mention that I am sending the image files from local machine after processing. I have also checked if it is an issue with file size, but that seems not to be the case.

Any suggestion or solution would be extremely helpful, as this issue has stumped me for a while now.

Thanks


Document details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

GiftA-MSFT commented 4 years ago

@sensoham we will review your feedback and get back to you shortly. Thanks.

RohitMungi-MSFT commented 4 years ago

@sensoham Do you see the same behavior for the read api too? It would be helpful if the image can be shared so we can pass that to our product team.

GiftA-MSFT commented 4 years ago

Will proceed to close this thread. However, @sensoham please share link to a sample image(s) so we can investigate further, thanks.