Bug#1098672: fails with PYTHONSAFEPATH
VA
bugs at indigo.re
Sat Feb 22 14:24:30 GMT 2025
Package: trimage
Version: 1.0.6-2
When running a game with PYTHONSAFEPATH=y, this error occurs at start:
```
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/trimage/trimage.py", line 16, in
<module>
from ThreadPool import ThreadPool
ModuleNotFoundError: No module named 'ThreadPool'
```
This is because the code does absolute imports not using the package
name while in a package:
/usr/lib/python3/dist-packages/trimage/trimage.py contains
`from ThreadPool import ThreadPool` while it should be either:
- `from .ThreadPool import ThreadPool`
- or `from trimage.ThreadPool import ThreadPool`
Also, the runner in /bin is rather unidiomatic, it starts a second
python interpreter within the first.
More information about the Pkg-phototools-devel
mailing list