bilelmoussaoui / bilelmoussaoui/Hardcode-Tray
hardcode-tray is incompatibile with lastest inkscape
- Dominant language
- Python
- Stars
- 890
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
### Specifications
- Hardcode-Tray version : 4.3.r90.gf3e2d59-1 ``
- Distribution : Manjaro Linux KDE x86_64 ``
- Gtk version : `gtk3 1:3.24.20-1`
- Inkscape version : `1.0-3`
- Cairo version : `1.17.2+17+g52a7c79fd-2`
- Sni-qt version: `` if installed
- Application name : `bitwarden-bin`
- Application version : `1.17.2-1`
### Expected behavior and actual behavior
```
sudo hardcode-tray --theme Papirus --conversion-tool Inkscape
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: Papirus
Conversion Tool: Inkscape
To Do: All
1 - Apply
2 - Revert
3 - Clear Backup Cache
Please choose: 1
Applying now..
Traceback (most recent call last):
File "/usr/bin/hardcode-tray", line 121, in
App.execute()
File "/usr/lib/python3.8/site-packages/HardcodeTray/app.py", line 120, in execute
delta = app.do_action(action)
File "/usr/lib/python3.8/site-packages/HardcodeTray/modules/applications/application.py", line 148, in do_action
self.install()
File "/usr/lib/python3.8/site-packages/HardcodeTray/decorators.py", line 58, in wrapper
func(app)
File "/usr/lib/python3.8/site-packages/HardcodeTray/modules/applications/application.py", line 96, in install
self.execute(Action.APPLY)
File "/usr/lib/python3.8/site-packages/HardcodeTray/modules/applications/helpers/binary.py", line 50, in execute
self.install_icon(icon, icon_path)
File "/usr/lib/python3.8/site-packages/HardcodeTray/modules/applications/electron.py", line 38, in install_icon
png_bytes = get_pngbytes(icon)
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 92, in to_bin
with open(outfile, 'rb') as temppng:
FileNotFoundError: [Errno 2] Nie ma takiego pliku ani katalogu: '/tmp/tmpwymebquv'
```
### Steps to reproduce the problem
1. install lastest inkscape (1.0-x)
2. launch hardcode-tray via `sudo hardcode-tray --theme Papirus --conversion-tool Inkscape`
3. Python freak out.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with `sudo hardcode-tray --theme Papirus --conversion-tool Inkscape`, then inspect `HardcodeTray/modules/svg/svg.py` and the `get_pngbytes` call in `HardcodeTray/utils.py`. Done means the Inkscape conversion produces the expected temporary PNG and the Bitwarden icon replacement completes without the `FileNotFoundError`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100