pulseaudio-equalizer-ladspa / equalizer

Pulseaudio LADSPA Equalizer
GNU General Public License v3.0
138 stars 15 forks source link

Error loading presets #15

Closed FFY00 closed 5 years ago

FFY00 commented 5 years ago

Sometimes when trying to load presets:

Match!
Can't find Headphones preset
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/pulseeq/equalizer.py", line 205, in on_presetsbox
    ladspa_filename = str(rawdata[0])
UnboundLocalError: local variable 'rawdata' referenced before assignment
FFY00 commented 5 years ago

I haven't been able to reproduce again. Perhaps you missed a return here?

https://github.com/pulseaudio-equalizer-ladspa/equalizer/blob/a4850ac68ee1da3efdbe18f84c2aa15876ead3d3/pulseeq/equalizer.py#L174

rautesamtr commented 5 years ago

Sadly error handling is basically absent in this application beside some prints. Still lets go for the basic return to fix the bug for now and tackle proper error handling later since part of this is going to get rewritten in the preset class refactoring.

Note: Just for the sake of reproducing this and keeping that info for later. Deleting a preset while the application is running and no GetSettings() is called before trying to load a preset should cause this.

FFY00 commented 5 years ago

Can't reproduce anymore.