IndexError when monitoring

Bug #437310 reported by Ahmed El-Mahdawy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Olifant
Fix Committed
Undecided
Unassigned

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/threading.py", line 525, in __bootstrap_inner
    self.run()
  File "/home/propeng/Projects/Olifant/glnew.py", line 42, in run
    Folder_ACPI = secmod.TrovaInfo()
  File "/home/propeng/Projects/Olifant/sec_modules.py", 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 glnew.py
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
Revision history for this message
Ivan (inovembri-deactivatedaccount) wrote :

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)
Revision history for this message
Ivan (inovembri-deactivatedaccount) wrote :

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.