@trinitronx i guess you already reported upstream, due to your comment here: https://github.com/Kilian/Trimage/issues/78#issuecomment-2597540673
You are right, that this should be resolved upstream.
![]() |
VOOZH | about |
| Git Clone URL: | https://aur.archlinux.org/trimage.git (read-only, click to copy) |
|---|---|
| Package Base: | trimage |
| Description: | A GUI based lossless image compressor. |
| Upstream URL: | http://trimage.org |
| Licenses: | custom:MIT |
| Submitter: | Francois_B |
| Maintainer: | Stunkymonkey |
| Last Packager: | Stunkymonkey |
| Votes: | 22 |
| Popularity: | 0.000000 |
| First Submitted: | 2016-05-16 06:58 (UTC) |
| Last Updated: | 2020-03-19 12:21 (UTC) |
@trinitronx i guess you already reported upstream, due to your comment here: https://github.com/Kilian/Trimage/issues/78#issuecomment-2597540673
You are right, that this should be resolved upstream.
Seems to be a bit broken on python3.13 when using the GUI or passing a single file with: trimage -f /tmp/test.png
Warning: versions are different between png.h and png.c
png.h version: 1.6.37
png.c version: 1.6.44
pngcrush 1.8.13, uses libpng 1.6.37 and zlib 1.2.11
Check http://pmt.sf.net/
for the most recent version.
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/trimage/ThreadPool/ThreadPool.py", line 90, in execute
return_value = self.callable(*self.arguments) #IGNORE:W0142
File "/usr/lib/python3.13/site-packages/trimage/trimage.py", line 381, in compress
copy(self.fullpath, backupfullpath)
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/shutil.py", line 428, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/shutil.py", line 240, in copyfile
raise SameFileError("{!r} and {!r} are the same file".format(src, dst))
shutil.SameFileError: '/tmp/test.png' and '/tmp/test.png' are the same file
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.13/threading.py", line 1041, in _bootstrap_inner
self.run()
~~~~~~~~^^
File "/usr/lib/python3.13/site-packages/trimage/ThreadPool/ThreadPool.py", line 131, in run
job.execute()
~~~~~~~~~~~^^
File "/usr/lib/python3.13/site-packages/trimage/ThreadPool/ThreadPool.py", line 93, in execute
logger.warning("A job in the ThreadPool raised an exception: ", excep)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/logging/__init__.py", line 1531, in warning
self._log(WARNING, msg, args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/logging/__init__.py", line 1664, in _log
self.handle(record)
~~~~~~~~~~~^^^^^^^^
File "/usr/lib/python3.13/logging/__init__.py", line 1680, in handle
self.callHandlers(record)
~~~~~~~~~~~~~~~~~^^^^^^^^
File "/usr/lib/python3.13/logging/__init__.py", line 1735, in callHandlers
if record.levelno >= hdlr.level:
^^^^^^^^^^
AttributeError: '_io.TextIOWrapper' object has no attribute 'level'
Passing a directory on the CLI does appear to work: trimage -d /tmp/test
Warning: versions are different between png.h and png.c
png.h version: 1.6.37
png.c version: 1.6.44
pngcrush 1.8.13, uses libpng 1.6.37 and zlib 1.2.11
Check http://pmt.sf.net/
for the most recent version.
** Processing: /tmp/test/test.png
1910x1362 pixels, 4x8 bits/pixel, RGB+alpha
Input IDAT size = 566932 bytes
Input file size = 571072 bytes
Trying:
zc = 9 zm = 9 zs = 0 f = 0 IDAT size = 436327
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 435470
zc = 9 zm = 9 zs = 0 f = 2 IDAT size = 431901
zc = 9 zm = 8 zs = 0 f = 2 IDAT size = 431485
Selecting parameters:
zc = 9 zm = 8 zs = 0 f = 2 IDAT size = 431485
Output IDAT size = 431485 bytes (135447 bytes decrease)
Output file size = 435217 bytes (135855 bytes = 23.79% decrease)
Warning: versions are different between png.h and png.c
png.h version: 1.6.37
png.c version: 1.6.44
Recompressing IDAT chunks in /tmp/test/test.png to /tmp/test/test.png.bak
Total length of data found in critical chunks = 403298
Best pngcrush method = 7 (ws 15 fm 0 zl 9 zs 0) = 436384
CPU time decode 0.109618, encode 1.370095, other 0.006705, total 1.504558 sec
File: /tmp/test/test.png, Old Size: 557.7KB, New Size: 426.2KB, Ratio: 23.6%
Exception ignored in: <function Worker.__del__ at 0x7fe590dd76a0>
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/trimage/trimage.py", line 414, in __del__
File "/usr/lib/python3.13/site-packages/trimage/ThreadPool/ThreadPool.py", line 172, in shutdown
TypeError: 'NoneType' object is not callable
The test image gets compressed, but then a NoneType error is returned. These errors are likely bugs in upstream rather than packaging issues.
@meetmarvin Removing all the files, except for PKGBUILD, and running makepkg -sic again, solved the issue: ModuleNotFoundError: No module named 'trimage'
Please remove python-sip-pyqt5 as dependancy.
@fbrennan due to the changes in v5.11, where sip is moved into qt5 the dependency can be ignored: https://www.riverbankcomputing.com/static/Docs/PyQt5/incompatibilities.html#pyqt-v5-11
Any hint how to fix this? Thanks!
~ » trimage marvin@marvint-dl Traceback (most recent call last): File "/usr/bin/trimage", line 19, in <module> import trimage ModuleNotFoundError: No module named 'trimage'
dependency python-sip-pyqt5 is gone: https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/sip&id=c54e6b92bda43fbea070c1b00c0695ec495c29c4
Hendrikto, this is a problem of the phonon-qt4 package. Read the AUR comments there.
This does not build:
$ aurman -S trimage --deep_search
~~ initializing aurman...
~~ calculating solutions...
!! While searching for solutions the following errors occurred:
:: Not provided: python2-pyqt but needed by trimage-1.0.5-1
!! we could not find a solution
I tried installing the dependency manually, but it still did not work:
$ aurman -S --asdeps python2-pyqt4
~~ initializing aurman...
~~ calculating solutions...
!! While searching for solutions the following errors occurred:
:: Not provided: phonon-qt4-backend but needed by phonon-qt4-4.10.1-2
!! we could not find a solution
!! if you think that there should be one, rerun aurman with the --deep_search flag