NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.39k stars 14.35k forks source link

auto-cpufreq-gtk Fails to Start Due to Missing Icon File #337494

Closed aucub closed 1 month ago

aucub commented 3 months ago

Describe the bug

When attempting to launch auto-cpufreq-gtk, the application crashes with a gi.repository.GLib.GError. The error indicates that the application is trying to open an icon file (auto-cpufreq.png) from a path that does not exist in the Nix store. As a result, the GTK interface fails to initialize. Error Traceback:

Traceback (most recent call last):
  File "/nix/store/sfl09j5iasfj71jfcylnnsh1zgbif00s-python3.12-auto-cpufreq-2.3.0/bin/..auto-cpufreq-gtk-wrapped-wrapped", line 9, in <module>
    sys.exit(main())
             ^^^^^^
  File "/nix/store/sfl09j5iasfj71jfcylnnsh1zgbif00s-python3.12-auto-cpufreq-2.3.0/lib/python3.12/site-packages/auto_cpufreq/bin/auto_cpufreq_gtk.py", line 15, in main
    win = ToolWindow()
          ^^^^^^^^^^^^
  File "/nix/store/sfl09j5iasfj71jfcylnnsh1zgbif00s-python3.12-auto-cpufreq-2.3.0/lib/python3.12/site-packages/auto_cpufreq/gui/app.py", line 37, in __init__
    pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(filename=ICON_FILE, width=500, height=500, preserve_aspect_ratio=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gi.repository.GLib.GError: g-file-error-quark: Failed to open file “/nix/store/sfl09j5iasfj71jfcylnnsh1zgbif00s-python3.12-auto-cpufreq-2.3.0/share/pixmaps/auto-cpufreq.png”: No such file or directory (4)

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install auto-cpufreq using Nix.
  2. Attempt to start the GTK interface by running auto-cpufreq-gtk in the terminal.
  3. Observe the application crash with the above error.

Expected behavior

The auto-cpufreq-gtk application should start without errors, displaying the GTK interface correctly. The necessary icon files should be available in the expected directory within the Nix store.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Notify maintainers

@sarcasticadmin

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.10.5-zen1, NixOS, 24.11 (Vicuna), 24.11.20240824.d0e1602`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Lix, like Nix) 2.91.0
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/uymi/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/uymi/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/uymi/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/uymi/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/store/9mjmw3mcvhicd3pajn0jh379xwx674hx-gnome-settings-daemon-46.0/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/apms7kqjgl9lxb1gqmhj4kxcbvlnfg4w-lix-2.91.0/share`
 - nixpkgs: `/nix/store/ia1zpg1s63v6b3vin3n7bxxjgcs51s2r-source`

Add a :+1: reaction to issues you find important.

sarcasticadmin commented 3 months ago

Thanks @aucub for raising this up, Ill take a look at correcting this behavior this week.