svenssonaxel / pdf-sign

A tool to sign PDF files. With Linux support.
MIT License
118 stars 3 forks source link

Python 3.9 dependency #1

Closed ulifahrenberg closed 1 year ago

ulifahrenberg commented 1 year ago

Hi, on my machine (Ubuntu 20.4) python3 is python3.8 and pdf-sign bails out as follows:

uli@sibelius:~/pdf-sign$ ./pdf-sign 
Traceback (most recent call last):
  File "./pdf-sign", line 371, in <module>
    parser.add_argument('-b', '--batch', action=argparse.BooleanOptionalAction, default=False, help='Batch mode: do not show GUI.')
AttributeError: module 'argparse' has no attribute 'BooleanOptionalAction'

The internet told me that argparse.BooleanOptionalAction requires python3.9, so I installed that:

sudo apt install python3.9

Even after this, python3 still points to python3.8, so I also had to change the first line of pdf-sign to say

#!/usr/bin/env python3.9

This has fixed the problem. Cheers, Uli