IndexError in Volume Control: list index out of range

Reported by moondreamsgb on 2009-10-26
308
This bug affects 49 people
Affects Status Importance Assigned to Milestone
Awn Extras
Medium
onox
awn-extras-applets (Fedora)
New
Undecided
Unassigned
awn-extras-applets (Ubuntu)
Medium
Julien Lavergne
Nominated for Lucid by Yura Cagran

Bug Description

Description: Ubuntu 9.10
Release: 9.10

Architecture: i386
ExecutablePath: /usr/share/avant-window-navigator/applets/volume-control/volume-control.py
InterpreterPath: /usr/bin/python2.6
Package: awn-applets-python-core 0.3.2.2-2ubuntu1
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
PythonArgs: ['/usr/share/avant-window-navigator/applets/volume-control/volume-control.py', '--uid=1255366488', '--window=4194360', '--orient=0', '--height=35']

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/awn/extras/awnlib.py", line 1220, in __run
    self.__callback()
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py", line 255, in refresh_icon
    icon = [key for key, value in volume_ranges.iteritems() if volume <= value[0] and volume >= value[1]][0]
IndexError: list index out of range

Linux Gentoo 2.6.33-ck1 ~AMD64
Avant Window Navigator 0.4.1 Build using live ebuilds (*-9999)
Driver version: 1.0.21
Library version: 1.0.22
Utilities version: 1.0.22

IndexError in Volume Control: list index out of range

Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/awn/extras/awnlib.py", line 1462, in init_start
    applet_class(applet)
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py", line 104, in __init__
    self.setup_context_menu(prefs)
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py", line 169, in setup_context_menu
    self.load_track_pref(prefs)
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py", line 220, in load_track_pref
    self.reload_tracks()
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py", line 232, in reload_tracks
    self.backend.set_track(self.applet.settings["track"])
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py", line 453, in set_track
    self.__parent.refresh_icon(True)
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py", line 264, in refresh_icon
    icon = [key for key, value in volume_ranges.iteritems() if volume <= value[0] and volume >= value[1]][0]
IndexError: list index out of range

moondreamsgb (gbmoondreams) wrote :
tags: removed: need-duplicate-check
affects: ubuntu → awn-extras-applets (Ubuntu)
Julien Lavergne (gilir) on 2010-03-27
visibility: private → public
Julien Lavergne (gilir) wrote :

Thank you for your bug report.

Do you still have this problem with the 0.4.0 rc1 version of Awn and Awn-extras ?

You can obtain this version by one of the following ways :
- Using Ubuntu 10.04 (Lucid) up-to-date.
- Using the Awn-testing PPA (https://launchpad.net/~awn-testing/+archive/ppa) and installing avant-window-navigator-trunk.
- Using Ubuntu 9.10 (Karmic) and my PPA (https://launchpad.net/~gilir/+archive/backports/+packages)

Thanks in advance for your cooperation and understanding.

Changed in awn-extras-applets (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium
Hasik (krzysztof-hasinski) wrote :

Using lucid beta 1 (not updated to beta 2!):

The error seems to be fixed although volume control applet doesn't react to the volume changed in sound settings to over 100%. For example if I:
1) change the volume using applet in AWN to 77%
2) open the gnome sound settings, change it to 120% (over the 100% bar)
the volume shown in AWN volume control is still 77%

I don't have any idea how it should behave (the slider to the max and text info about the real volume on mouseover?). Tommorow I will do a clean install of lucid beta 2 and try to report the current state because aptitude shows a new version of this package.

Hasik (krzysztof-hasinski) wrote :

After a recheck (by just starting the ubuntu 10.04 beta 1) the index out of range error appears again (volume was left at 120% yesterday when turning the computer off). I also checked the version of the applet, it's 0.40 rc1 (the one Julien requested).

Julien Lavergne (gilir) wrote :

Thanks for the feedback. Forwarded upstream.

Changed in awn-extras-applets (Ubuntu):
status: Incomplete → Triaged
onox (onox) wrote :

Duplicate of #561636, which is fixed in revision 1290. Because launchpad cannot make a bug task a duplicate if it already has duplicates itself and I'm too lazy, I just make this bug task also set to Fix Committed.

Changed in awn-extras:
importance: Undecided → Medium
milestone: none → 0.4.2
status: New → Fix Committed
onox (onox) on 2010-04-19
summary: - volume-control.py crashed with IndexError in refresh_icon()
+ IndexError in Volume Control: list index out of range
description: updated
Changed in awn-extras:
assignee: nobody → onox (onox)
onox (onox) wrote :

@Michał Lipski: what does alsamixer tell you?

Michał Lipski (tallica) wrote :

Here it is.

onox (onox) wrote :
onox (onox) wrote :

@Michal: could you execute the python file above and paste the output?

Michał Lipski (tallica) wrote :

devices: ['hw:0']
master track: Master
volume range: (135, 255)
current volume: (152, 152)
120 0.833333333333 17
in %: 14%

onox (onox) wrote :

@Michal: could you open volume-control.py and then go to line 542, it should currently say this:

return sum(volume_channels) / len(volume_channels)

Change this to:

return sum(volume_channels) / len(volume_channels) - self.__current_track.min_volume

I think should fix the problem you have.

Changed in awn-extras:
status: Fix Committed → Confirmed
Michał Lipski (tallica) wrote :

Works as expected. Thanks.

onox (onox) wrote :

Fixed in revision 1295.

Changed in awn-extras:
status: Confirmed → Fix Committed
nimbosa (darth-serious) wrote :

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/awn/extras/awnlib.py", line 1580, in init_start
    applet_class(applet)
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py", line 71, in __init__
    self.setup_context_menu()
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py", line 158, in setup_context_menu
    self.load_channel_pref(prefs)
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py", line 199, in load_channel_pref
    self.applet.settings["channel"] = self.backend.channels[0]
IndexError: list index out of range

Avant Window Navigator 0.3.2.1
Fedora 11

Mark Lee (malept) wrote :

@nimbosa: That is a different bug than this one. Please see bug #387437 <https://bugs.edge.launchpad.net/awn-extras/+bug/387437> for your problem (which was fixed in version 0.4.0).

RickySmart (ricchartz) wrote :

  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py", line 264, in refresh_icon
    icon = [key for key, value in volume_ranges.iteritems() if volume <= value[0] and volume >= value[1]][0]
IndexError: list index out of range

Easy, just do a right click on the applet crassed, open Volume Control, and get down the volume of the system. Then restart the applet pressing it and that's all!

Please, forgive my poor English.. =D

onox (onox) on 2010-07-03
tags: added: applet traceback volume-control
nils (nilskasparov) wrote :

Thanks. Good for me.
Seems like applet don't recogize volume level more than 100%.
Maybe some strings in applet code will repair this bug?

Julien Lavergne (gilir) on 2010-08-26
Changed in awn-extras-applets (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Julien Lavergne (gilir)
onox (onox) wrote :

@nils: look at the status of this bug, which is "Fix Committed" -_-

JohnnyD' (yannis-dassiras) wrote :

I agree. I occasionally hit the bug on lucid 10.04 with kernel 2.6.35 so it's either not fixed or a new bug

onox (onox) wrote :

As I said the status is "Fix Committed", which means the fix has been committed to the master branch in bzr. Only when the status gets changed to "Fix Released" you should be able to find new package of awn-extras that contains the fix.

Launchpad Janitor (janitor) wrote :
Download full text (5.8 KiB)

This bug was fixed in the package awn-extras-applets - 0.4.0+bzr1372-0ubuntu1

---------------
awn-extras-applets (0.4.0+bzr1372-0ubuntu1) maverick; urgency=low

  * Sync with Debian
  * New upstream snapshot (LP: #626265)
   - YAMA: use lda instead of xdg for managing desktop files (LP: #497787)
   - Volume: fix crash on high volume value. (LP: #461123)
   - Weather: fix crash on activate_map_cb (LP: #581414)
   - File-browser-launcher: fix crash on mounting LUKS partition (LP: #532848)
   - Feeds: fix crash when getting favicon (LP: #561611)
   - Slickswitcher: Fix division by 0 (LP: #562548)
  * debian/control:
   - Build-depends on libindicator-dev (>= 0.3).
   - Build-depends on libzeitgeist-dev (>= 0.2.2).
   - Recommends python-gtop | python-gnome2-desktop for bandwidth-monitor.
   - Update description for new applets.
  * debian/rules:
   - Pass --with-indicator to enable indicator applet.
   - Remove schemas for desactivated applets.
   - Disable mount applet.
  * debian/awn-applets-c-core.install:
   - Install indicator applet.
   - Install related applet.
  * debian/awn-applets-python-core:
   - Disable mount applet.

awn-extras-applets (0.4.0-3) unstable; urgency=low

  * debian/control:
   - Add depends on python-awn-extras (>= 0.4.0) for all python applets.
     Closes: #589317
   - Fix wrong description for awn-applets-common. Closes: #587632
   - Recommend python-pyinotify for thinkhdaps applet.
   - Use Breaks instead of Replaces and Conflicts when moving files between
     packages to conform to Standards-Version 3.9.0.
   - Bump Standards-Version to 3.9.0.
   - Fix Conflicts for python-awn-extras.
   - Improve short descriptions.
  * debian/pyversions: Build only for python >= 2.5. Thanks Jakub Wilk for the
    patch. Closes: #587964
  * debian/copyright: Remove mention of BSD license in
    /usr/share/common-licenses to conform to Standards-Version 3.9.0.

awn-extras-applets (0.4.0-2) unstable; urgency=medium

  * Urgency set to medium to close RC bug.
  * debian/control:
   - Add Conflicts/Replaces between python-awn-extras and python-awnlib, all
     files from python-awnlib was moved into python-awn-extras.
     (Closes: #586744).

awn-extras-applets (0.4.0-1) unstable; urgency=low

  * New upstream release.
   - Catch error in weather applet (LP: #359668)
   - Stack applet close on click (LP: #261520)
   - Close cairo-menu after a click (LP: #511256)
   - Fix crash of awn-system-monitor (LP: #545164)
   - Fix crash when removing a volume >1 or adding volume >1 or using prefs
     while > 1 volumes is present (LP: #556175)
   - Fix crash of media-control when Rhythmbox quit (LP: #558463)
   - Fix crash of file-browser-launcher when there is no .gtk-bookmarks
     (LP: #551119)
  * Update applets location:
   - Plugger, Filebrowser, Trasher, DesktopManager, Lastfm, Meebo, Digg, Pynot,
     RTM applets removed.
   - Sysmon, Bandwidth-monitor, Dialect, Hardware sensors, YAMA, Slickswitcher
     applets added
   - Separator applet move to Awn package.
   - Trash applet replaced by Garbage applet.
   - Arss applet replaced by Feeds applet.
   - Showdesktop applet move from python-core to c-core.
   - Digital Clock applet mov...

Read more...

Changed in awn-extras-applets (Ubuntu):
status: In Progress → Fix Released
Luca Manzari (manzariluca) wrote :

"nils wrote on 2010-08-23: #19

Seems like applet don't recogize volume level more than 100%."

kudos for this, I'm experiencing the same.
Got applet version 0.4.0 on 64bit Ubuntu 10.04

Kaustubh P (thetuxracer) wrote :

I encountered a bug too. Seems the Output volume was amplified, i.e. more than 100 %. Setting the Output volume at exactly 100% restarted the AWN applet. The stacktrace is at: http://paste.ubuntu.com/577699/

Coman Mihai (z0id) wrote :

I get this error on Archlinux. It used to work, though, may be caused by an update.

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/awn/extras/awnlib.py", line 1462, in init_start
    applet_class(applet)
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py", line 104, in __init__
    self.setup_context_menu(prefs)
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py", line 169, in setup_context_menu
    self.load_track_pref(prefs)
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py", line 220, in load_track_pref
    self.reload_tracks()
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py", line 232, in reload_tracks
    self.backend.set_track(self.applet.settings["track"])
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py", line 453, in set_track
    self.__parent.refresh_icon(True)
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py", line 264, in refresh_icon
    icon = [key for key, value in volume_ranges.iteritems() if volume <= value[0] and volume >= value[1]][0]
IndexError: list index out of range

Povilas Kanapickas (p12) on 2013-11-17
Changed in awn-extras:
status: Fix Committed → Fix Released
To post a comment you must log in.