light-locker-settings crashes

Bug #1577208 reported by Gregory H Stark on 2016-05-01
This bug affects 7 people
Affects Status Importance Assigned to Milestone
light-locker-settings (Ubuntu)

Bug Description

light-locker-settings is a python program (available from the 'Preferences' menu) that uses a third-party module called 'psutils'. This module at one point had a method named 'get_pid_list()' which was renamed to 'pids()'. The old name was deprecated at least two years ago and then completely removed in the 3.0 release of psutils last June. light-locker-settings uses the old method name in line 219 of, resulting in the following exception stack:

london@england:~$ light-locker-settings
/usr/share/light-locker-settings/light-locker-settings/ PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, GLib, Gio
Traceback (most recent call last):
  File "/usr/share/light-locker-settings/light-locker-settings/", line 697, in <module>
    main = LightLockerSettings()
  File "/usr/share/light-locker-settings/light-locker-settings/", line 98, in __init__
  File "/usr/share/light-locker-settings/light-locker-settings/", line 454, in init_settings
    if self.check_running_process("xfce4-power-manager"):
  File "/usr/share/light-locker-settings/light-locker-settings/", line 219, in check_running_process
    for pid in psutil.get_pid_list():
AttributeError: 'module' object has no attribute 'get_pid_list'

The easy fix is to simply replace 'get_pid_list' with 'pids'.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: lightdm 1.18.1-0ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: LXDE
Date: Sun May 1 13:20:17 2016
InstallationDate: Installed on 2016-05-01 (0 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
SourcePackage: lightdm
UpgradeStatus: Upgraded to xenial on 2016-05-01 (0 days ago)

Gregory H Stark (ghstark) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lightdm (Ubuntu):
status: New → Confirmed
Florian Beeres (fbeeres-7) wrote :

Confirmed. Was missing python-gi first and got missing gi.repository error (only had python3-gi installed). With python-gi installed, I received the above mentioned error and replacing get_pid_list with pids fixed it.

Linux version 4.4.0-21-generic (buildd@lgw01-21) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2)

affects: lightdm (Ubuntu) → light-locker (Ubuntu)
Sean Davis (bluesabre) on 2016-05-14
affects: light-locker (Ubuntu) → light-locker-settings (Ubuntu)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers