0 votes

I'm running Ubuntu 25.04, and I installed ptxprint like this:

sudo apt install python3-ptxprint

I experience this error when I attempt to launch ptxprint by running ptxprint:

/usr/lib/python3/dist-packages/ptxprint/pdfrw/objects/pdfstring.py:120: SyntaxWarning: invalid escape sequence '\('
  the latter case should be encoded "(\(Hello)"
/usr/lib/python3/dist-packages/ptxprint/pdfrw/objects/pdfstring.py:375: SyntaxWarning: invalid escape sequence '\['
  1. \[nrtbf\()]: simple escapes
Traceback (most recent call last):
  File "/usr/bin/ptxprint", line 20, in <module>
    from ptxprint.utils import saferelpath
  File "/usr/lib/python3/dist-packages/ptxprint/utils.py", line 585, in <module>
    class Path(pathlib.Path):
    ...<34 lines>...
                return self.as_posix()
  File "/usr/lib/python3/dist-packages/ptxprint/utils.py", line 587, in Path
    _flavour = pathlib._windows_flavour if os.name == "nt" else pathlib._posix_flavour
                                                                ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pathlib' has no attribute '_posix_flavour'

Ubuntu 25.04 ships with Python 3.13. pathlib in this version of Python does not have the _posix_flavour attribute.

PTXprint by (495 points)

1 Answer

0 votes
Best answer

You're using an old version of ptxprint. Ubuntu's repositories do not include PTXprint. You must have installed the .deb from outside the Ubuntu repositories.

To install the latest version of PTXPrint on Ubuntu, run these commands:

sudo add-apt-repository ppa:silnrsi/ptxprint

sudo apt install python3-ptxprint

This will install PTXPrint from this PPA on Launchpad. This is the official PPA for PTXprint. You can verify this by visiting this download page on sil.org , it references this PPA.

by (495 points)
selected by
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
All the believers were one in heart and mind. No one claimed that any of their possessions was their own, but they shared everything they had.
Acts 4:32
3,036 questions
5,992 answers
5,659 comments
2,020 users