Сообщество

551 Unsupported image file format

Hi,

I'm getting the following error: <?xml version="1.0" encoding="utf-8"?><error><message language="english">Unsupported image file format</message></error> using the Python library. The issue is that it's working well on my local environment but whenever I'm trying in production environment I'm getting the error :/

Here is the flow:

  1. upload the image on s3
  2. create a rabbitmq task in order to call your service
  3. call ProcessImage in the task with the file that I'm pulling from s3
  4. the error happens at this point.

The image I'm trying to analyze are .jpeg (but I've got the same error with png) and the image is processed with PIL whenever I'm uploading the image, can the configuration of the machine affect the image ? What can exactly trigger the unsupported image format on one machine and not this other ?

Thanks

Была ли эта статья полезной?

Пользователи, считающие этот материал полезным: 1 из 1

Комментарии

Комментариев: 29

  • Avatar
    Anastasia Galimova

    The issue occurs because the processImage method is suitable for the images that are loaded from the computer directly. We have a method for processing the images that are located on a remote server, it is in beta-testing. We will send you the information about it by e-mail.

    1
  • Avatar
    Rfranco

    Hi, can you send me the information too? Or can we get the original file after OCR reads it? To be clear: The user upload the file to Abbyy, Abbye reads it and send to a server the original file and the txt file. Thanks!

    0
  • Avatar
    Anastasia Galimova

    We have send you the description of the method for processing remote images via e-mail.

    0
  • Avatar
    agurodriguez

    Hi! Can you send me the information too? Thanks! Regards!

    0
  • Avatar
    Oksana Serdyuk

    We have sent you the description of the method by e-mail, too.

    0
  • Avatar
    Andrey Zakharov

    Hi, I have the same problem as topic starter described, but don't use S3 and send local images. I use Python and it's working on local enviroment and on development server, but get error Unsupported image file format. I tried to google a solution, but nothing found.

    0
  • Avatar
    Oksana Serdyuk

    Hi Andrey,

    Sorry for the delay in response. If the issue is still actual, please send to CloudOCRSDK@abbyy.com the following information:

    1) your Application ID;

    2) the image you recognize;

    3) logs from any HTTP debugger (for example, Fiddler).

    0
  • Avatar
    mflmartin

    I need that solution as well. A simple image from a shared host works, but from an AMAZON EC2 instance, it does not work, it says unsupported image file format, when the image is perfectly fine, and works in another shared server. I am using PHP.

    Can you post it or send it via email? It's urgent. Thanks.

    0
  • Avatar
    Oksana Serdyuk

    We answered you by e-mail yesterday.

    0
  • Avatar
    vitaly

    Dear support, I've got the same problem with API. Any images return error: "551 Unsupported image file format" although the previous old server didn't get such an error.

    0
  • Avatar
    Julia Anikushina

    We answered you by e-mail.

    0
  • Avatar
    rx4hvn

    Hi There! I am not able to convert image to text file using PHP. I am running it from xampp local server. I tried with several sample images provided in your website. It always shows the same error message saying Unsupported image file format.

    But it runs well in JavaScript. But i want to do it from PHP or the AJAX style if possible.

    Please Help. Thanks in Advance.

    0
  • Avatar
    Oksana Serdyuk

    Please make sure that you transmit to the service the binary data as is. The fact is that Cloud OCR SDK cannot work with the data encoded in base64.

    If the issue is still actual, please kindly send to CloudOCRSDK@abbyy.com the logs from any HTTP debugger (for example, Fiddler). It allows to see what requests do you send to the server. You can download the Fiddler debugger for free here: www.telerik.com/fiddler.

    0
  • Avatar
    JWA-Axiscare

    I'm having the problem with the API returning "551 Unsupported image file format" on a new server. My old server still works.

    0
  • Avatar
    Oksana Serdyuk

    To let us investigate the issue please send to CloudOCRSDK@abbyy.com the following information:

    1) your Application ID;

    2) logs from any HTTP debugger (for example, Fiddler);

    3) the programming language you use.

    0
  • Avatar
    seizart

    i have same issue,

    Please send correct method by email

    Thanks

    0
  • Avatar
    Oksana Serdyuk

    We have sent you the description of the method by e-mail.

    0
  • Avatar
    sangram

    i have same issue,

    Please send the solution to me.I think you should post the answer in forum so that everyone can able to get it. (Note: The same code works properly on the godadday server but it is not working on the aws ec2)

    Thanks

    0
  • Avatar
    Oksana Serdyuk

    The fact is that the method is still in a beta status and is not fully tested, that's why we provide it only on demand. We have sent you the description of the method by e-mail, please check it.

    0
  • Avatar
    sangram

    Based on the references you provided implemented but getting following error "Unexpected task status Submitted".Looks like it is not returning proper status.

    0
  • Avatar
    Oksana Serdyuk

    Please check if you transmit the source parameter with the direct URL address of the image which must be recognized with the corresponding filename extension.

    If the issue is still actual, please send to CloudOCRSDK@abbyy.com the logs from any HTTP debugger (for example, Fiddler). It allows to see what requests do you send to the server. You can download the Fiddler debugger for free here: www.telerik.com/fiddler.

    0
  • Avatar
    Taras Danylyuk

    Can I get your email with method, that fetch image from s3?

    0
  • Avatar
    rekerc4

    Can you send me a method for remote servers?

    0
  • Avatar
    Helen Osetrova

    Hi, I have sent you the description of method via private message.

    0
  • Avatar
    Dina

    Hi,

    i have the same issue. Can you send me instructions to fix this? I'm sending the image from our server using curl with php.

    Thanks!

    0
  • Avatar
    Jan Rijavec

    I have same problem. I would also like to reach the solution.
    Thankyou

    0
  • Avatar
    kdyes

    I also have this issue, sending image data via curl/php. It works fine on development machine but returns '551 unsupported image file format' when sending the image from EC2.

     

    Please could you share the solution mentioned in this thread?

     

     

    0
  • Avatar
    RuskinF

    I faced that issue as well.

    When I copy the image to my local workstation and then alter it then there are errors in the processing.

    Copy the page to your local computer and then process the image.

    That should work fine.

    0
  • Avatar
    AIRO ZAMONER JUNIOR

    I'm using the example image (MobPhoto_1.jpg).

    I try to run the code in localhost and also in my cpanel linux server.

    my request was in PHP, something like the code below and the response is "Unsupported image file format". 

    $url = $this->serviceUrl.'/submitImage';
    $curlHandle = curl_init();
    curl_setopt($curlHandle, CURLOPT_URL, $url);
    curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curlHandle, CURLOPT_USERPWD, $this->application_id . ':' . $this->application_password);
    curl_setopt($curlHandle, CURLOPT_POST, 1);
    $post_array = array( "my_file"=>"@".$filePath, );
    curl_setopt($curlHandle, CURLOPT_POSTFIELDS, $post_array);
    $response = curl_exec($curlHandle);
    if($response == FALSE) {
    $errorText = curl_error($curlHandle);
    curl_close($curlHandle);
    die($errorText);
    }
    curl_close($curlHandle);

    #####

    I Found the solution:

    Replacing the line:

    $post_array["my_file"] = "@".$filePath;

    With:

    if((version_compare(PHP_VERSION, '5.5') >= 0)) {
    $post_array["my_file"] = new CURLFile($filePath);
    } else {
    $post_array["my_file"] = "@".$filePath;
    }
    1

Войдите в службу, чтобы оставить комментарий.