Menu

#205 Gscan2pdf problem with unpaper 6.2: ERROR - Error running unpaper: [image2 @ 0x1338180] Encoder did not produce proper pts, making some up.

v1.0_(example)
closed-fixed
nobody
None
5
2016-01-11
2015-08-31
Wikinaut
No

INFO - unpaper --black-threshold 0.33 --border-align bottom,left,right,top --border-margin 0,0 --deskew-scan-direction bottom,left,right,top --layout single --output-pages 1 --white-threshold 0.9 --overwrite /tmp/gscan2pdf-wOju/IBBlVbRkT8.pnm /tmp/gscan2pdf-wOju/wyqKMxC2nY.pnm ;
INFO - signal 'finished-process' emitted with data: scan_pages
INFO - Processing sheet #1: /tmp/gscan2pdf-wOju/IBBlVbRkT8.pnm -> /tmp/gscan2pdf-wOju/wyqKMxC2nY.pnm
out of deviation range - NO ROTATING

ERROR - [image2 @ 0x1338180] Encoder did not produce proper pts, making some up.

ERROR - Error running unpaper: [image2 @ 0x1338180] Encoder did not produce proper pts, making some up.

Discussion

  • Wikinaut

    Wikinaut - 2015-09-06

    Hi. It appears, that unpaper is working correctly, and produces output as wanted. However, this message should better go to /dev/null.

    So, as a quick and dirty fix, I modified (added) in Unpaper.pm almost at the end

    $cmd .= " 2>/dev/null"

    to avoid Gscan2Pdf to stop the process queue, when the error message (from unpaper) comes up.

    The unpaper problem is now filed upstream in https://github.com/Flameeyes/unpaper/issues/40 .

     
  • Jeffrey Ratcliffe

    Absolutely not. This will also mask any other errors that unpaper emits.

    gscan2pdf reads stderr for a reason.

    Perhaps gscan2pdf should use the output from unpaper even if it throws an error? Perhaps this should be only an option?

     
  • Wikinaut

    Wikinaut - 2015-09-15

    Just as an addition: I looked for this error string in unpaper sources, but could not find it there.

    I now suppose, that this specific error comes from the libavcodec (or ffmpeg) library, but I am not sure.

     
  • Alistair

    Alistair - 2016-01-05

    Perhaps gscan2pdf should use the output from unpaper even if it throws an error? Perhaps this should be only an option?

    It looks like unpaper returns status 0 even though the message text says it is an error. Perhaps messges to stderr with exit status 0 could be treated as warnings?

    Buyer beware - I don't know how consistent unpaper is with this behaviour.

     
  • Alistair

    Alistair - 2016-01-09

    Hi Jeffrey,

    Can we expect a workaround for this in the next release?

    If not, my workaround has been to create a script that runs unpaper and greps out the offending error message. At the moment it is in python as that is what I'm familiar with, but I'm happy to convert it to bash if you want it (sorry, but perl still drives me crazy).

    Thanks,
    Alistair

     
  • Jeffrey Ratcliffe

    This turned out to be reasonably straightforward to fix. In the upcoming version, I've patched the "ignore this message" code to ignore any memory addresses in hex.

     
    • Alistair

      Alistair - 2016-01-11

      Thanks for the update, and as always, for making gscan2pdf availabe.

       
  • Jeffrey Ratcliffe

    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB