Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to apply settings on the brightness slider tab #371

Closed
therealmate opened this issue Dec 28, 2024 · 1 comment
Closed

Comments

@therealmate
Copy link

Describe the bug
Can't change any setting on the brightness slider tab (e.g.:changing backend from brightnessctl to ddcutil.)

Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/nwg_panel/config.py", line 1305, in restart_panel
self.apply_changes()
~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.13/site-packages/nwg_panel/config.py", line 1285, in apply_changes
self.update_brightness_slider()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.13/site-packages/nwg_panel/config.py", line 3251, in update_brightness_slider
settings[setting] = value
^^^^^
UnboundLocalError: cannot access local variable 'value' where it is not associated with a value

To Reproduce
Steps to reproduce the behavior:

  1. Go to Panel settings
  2. Click on 'Brightness slider'
  3. Click Apply or Apply/restart
  4. See error in terminal

Expected behavior
Being able to change settings on the brightness slider tab

Desktop (please complete the following information):

  • Distro: Arch Linux
  • WM: Labwc
  • nwg-panel version: 0.9.58

Additional context
Maybe it could be considered to change the default brightness backend from brightnessctl to ddcutil as ddcutil probably works on more devices (including mine)

@nwg-piotr
Copy link
Owner

I've added a patch to avoid crashes like this, but generally I'd like to get rid of this module one day. It is difficult to configure and unreliable in operation.

nwg-piotr added a commit that referenced this issue Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants