Traceback (most recent call last):
File "/usr/bin/pdfx", line 11, in
sys.exit(main())
File "/usr/lib64/python2.7/site-packages/pdfx/cli.py", line 189, in main
print_to_console(text)
File "/usr/lib64/python2.7/site-packages/pdfx/cli.py", line 130, in print_to_console
bytes_string = text.encode(sys.stdout.encoding, 'backslashreplace')
TypeError: encode() argument 1 must be string, not None
Trying to pipe output of pdfx causes error
Traceback (most recent call last): File "/usr/bin/pdfx", line 11, in
sys.exit(main())
File "/usr/lib64/python2.7/site-packages/pdfx/cli.py", line 189, in main
print_to_console(text)
File "/usr/lib64/python2.7/site-packages/pdfx/cli.py", line 130, in print_to_console
bytes_string = text.encode(sys.stdout.encoding, 'backslashreplace')
TypeError: encode() argument 1 must be string, not None
Similar errors can be found in other projects, such as https://github.com/ansible/ansible/commit/c8494cdc39186250e4f814dfc9f86707bc4476c3