IndexError when monitoring

Bug #437310 reported by Ahmed El-Mahdawy on 2009-09-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

(On desktop PCs) When monitoring is started by clicking on the toolbar button, the following is displayed in the terminal:

Exception in thread Thread-5:
Traceback (most recent call last):
  File "/usr/lib/python2.6/", line 525, in __bootstrap_inner
  File "/home/propeng/Projects/Olifant/", line 42, in run
    Folder_ACPI = secmod.TrovaInfo()
  File "/home/propeng/Projects/Olifant/", line 10, in TrovaInfo
    DEV_alim = os.listdir(folder_alim)[0]
IndexError: list index out of range

Steps to reproduce:
1. Start the python script in a terminal window by changing to the .py directory and typing: python
2. Click the first toolbar button, 'Lock' (in the English version; in the Italian version it's 'Blocca').
3. An error message appears in the terminal but the app still runs.

description: updated

The cause of this problem, is the lack of files in /proc/acpi/ac_adapter, on a normal computer.

On a destop pc:
[pc@fossil ~]$ ls /proc/acpi/
ac_adapter dsdt fadt power_resource thermal_zone
battery embedded_controller fan processor wakeup
button event info sleep
[pc@fossil ~]$ ls /proc/acpi/ac_adapter/
[pc@fossil ~]$ ls /proc/acpi/battery/

This program is made to run on a laptop.

Changed in olifant:
assignee: nobody → Ivan Novembri (inovembri)

I committed the fix in my branch olifant-dev.
My branch will be merged with the main one.

That's not a very fix, it shows a warning «Run this program on a laptop».

Changed in olifant:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers