Hi!
On Ubuntu 24.04.2 LTS, I have PTXprint, version from yesterday (python3-ptxprint/noble,noble,now 2.8.20-0~20250709~ubuntu24.04.1 all [installed]) and refuses to start. One week ago this started to happen. I do not have usfmtc file on my system.
pc@pc:~/Dokumenti/GitHub/SloKJV/PTXprint$ ptxprint
Traceback (most recent call last):
File "/usr/bin/ptxprint", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3/dist-packages/ptxprint/main.py", line 145, in main
from ptxprint.gtkview import GtkViewModel, getPTDir, reset_gtk_direction
File "/usr/lib/python3/dist-packages/ptxprint/gtkview.py", line 29, in <module>
from ptxprint.view import ViewModel, Path, VersionStr, GitVersionStr
File "/usr/lib/python3/dist-packages/ptxprint/view.py", line 3, in <module>
from ptxprint.texmodel import TexModel, Borders, _periphids
File "/usr/lib/python3/dist-packages/ptxprint/texmodel.py", line 7, in <module>
from ptxprint.usxutils import Usfm, Sheets
File "/usr/lib/python3/dist-packages/ptxprint/usxutils.py", line 2, in <module>
import usfmtc
ModuleNotFoundError: No module named 'usfmtc'
Instaling from pip is not helpfull (Python 3.12.3)
pc@pc:~/Dokumenti/GitHub/SloKJV/PTXprint$ python3 -m pip install usfmtc
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.12/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
I cannot find this file on GitHub - sillsdev/ptx2pdf: XeTeX based macro package for typesetting USFM formatted (Paratext output) scripture files
https://github.com/sillsdev/ptx2pdf/tree/master
Looks like /usr/lib/python3/dist-packages/ptxprint/usxutils.py is using it
==========usxutils.py=======
import re, regex, logging, os, time
import usfmtc
from usfmtc.reference import Ref, RefList
from usfmtc.usfmparser import Grammar
from ptxprint.utils import universalopen, runChanges
from usfmtc.xmlutils import ParentElement, hastext, isempty
from usfmtc.usxmodel import iterusx, addesids
from ptxprint.changes import readChanges
from ptxprint.ptsettings import PTEnvironment
from copy import deepcopy
...
===========================