Skip to content

Python 3.6 - file not in binary mode for writing #2

@jdstrydom

Description

@jdstrydom

Hi,

Using Python 3.6 - received error message and zero-size signed .pdf when using for example:

signpdf --date myfile.pdf signature.png

file <myfile.pdf> to write to is not in binary mode. It may not be written to correctly. [pdf.py:453]

I had to change line 62 of "/usr/local/lib/python3.6/dist-packages/signpdf.py"

From: with open(output_filename, 'w') as fh:
To: with open(output_filename, 'wb') as fh:

All good now
Regards
Jurie

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions