Running harcode-tray fails with the following traceback:
Welcome to Hardcode-Tray!
Hardcode-Tray replaces some icons on the binary files of some applications.
Please close all the running applications before running Hardcode-Tray script.
Desktop Environment: Other
Scaling Factor: 1
Icon Size: 22
Icon Theme: Numix-Circle
Conversion Tool: Inkscape
To Do: All
Applying now..
Caprine [######..............................] 1/6 16.7% 0.79s
Dropbox [############........................] 2/6 33.3% 1.10s
Megasync [##################..................] 3/6 50.0% 0.00s
Traceback (most recent call last):
File "/usr/bin/hardcode-tray", line 121, in <module>
App.execute()
[...]
File "/usr/lib/python3.8/site-packages/HardcodeTray/utils.py", line 215, in get_pngbytes
png_bytes = App.svg().to_bin(icon_for_replace,
File "/usr/lib/python3.8/site-packages/HardcodeTray/modules/svg/svg.py", line 91, in to_bin
with open(outfile, 'rb') as temppng:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpge1lsq1f'
I tracked the problem down to the PNG temporary file being deleted if the Garbage Collector decides to deallocate the NamedTemporaryFile that is inlined in HardcodeTray.svg.svg
Specifications
3.8
4.3
ArchLinux
3.24
Megasync
v4.3.1
Expected behavior and actual behavior
Running
harcode-tray
fails with the following traceback:I tracked the problem down to the PNG temporary file being deleted if the Garbage Collector decides to deallocate the
NamedTemporaryFile
that is inlined inHardcodeTray.svg.svg
I'll open a PR to fix the issue.