light-locker-settings does not start

Bug #1586710 reported by Scott Cowles Jacobs
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Confirmed
Medium
Unassigned
light-locker-settings (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

This bug, like 1559735, causes a menu invocation to fail with nothing seeming to happen at all.

However, a terminal invocation does NOT show :
"
...
File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 219, in check_running_process
    for pid in psutil.get_pid_list():
AttributeError: 'module' object has no attribute 'get_pid_list'
"

but:
"
...
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 358, in get_autostart
    GLib.KeyFileFlags.KEEP_TRANSLATIONS)
GLib.Error: g-key-file-error-quark: Valid key file could not be found in search dirs (2)
"

------------------------
scott@scott-Asus-M2N68-AM-Plus:~$ uname -a
Linux scott-Asus-M2N68-AM-Plus 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:15 UTC 2016 i686 athlon i686 GNU/Linux
scott@scott-Asus-M2N68-AM-Plus:~$ lsb_release -dsc
Ubuntu 16.04 LTS
xenial
scott@scott-Asus-M2N68-AM-Plus:~$ echo $DESKTOP_SESSION
Lubuntu

-------------------------------
[Oddly enough, I DID have the result in bug 1559735 back on May 7, as I apparently did a screenshot of it. Has light-locker-settings been updated since May 7 ?]

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: light-locker-settings 1.5.0-0ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-22.40-generic 4.4.8
Uname: Linux 4.4.0-22-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 2.20.1-0ubuntu2
Architecture: i386
CurrentDesktop: LXDE
Date: Sat May 28 19:58:54 2016
InstallationDate: Installed on 2016-05-05 (23 days ago)
InstallationMedia: Lubuntu 16.04 LTS "Xenial Xerus" - Release i386 (20160420.1)
PackageArchitecture: all
SourcePackage: light-locker-settings
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Scott Cowles Jacobs (scott092707) wrote :
Revision history for this message
Elendil (abjects) wrote :

Under Lubuntu 16.04 I get exactly the same bug and I fixed it by changing the line 219 of file /usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py from
for pid in psutil.get_pid_list():
to:
for pid in psutil.pids():

This bug is due to a change in the module psutil that rename the function get_pid_list() into pids() since version 2.0.0 - 2014-03-10 of psutil (see https://github.com/giampaolo/psutil/blob/caaacb30b013f2164e86548e1077002b0df541bf/HISTORY.rst#200---2014-03-10).
Under Lubuntu 16.04 psutil installed version is the 3.4.2-1

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in light-locker-settings (Ubuntu):
status: New → Confirmed
Revision history for this message
Elendil (abjects) wrote :

Seems to be the same bug as https://bugs.launchpad.net/ubuntu/+source/light-locker-settings/+bug/1574544

This post report also a similar problem : https://bugs.launchpad.net/ubuntu/+source/light-locker-settings/+bug/1602338

I lately saw that the bug is already fixed so may be you can close both this and #1602338
 issues.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "light-locker-settings.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
LinuxFreak (bwvienna) wrote :

Hello,

the patch at #1559735 worked for me at Lubuntu 16.04 32 Bit
regards AP

Revision history for this message
Scott Cowles Jacobs (scott092707) wrote :

First, note that in:
 /usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py
line 234 also needs to be changed from "get_pid_list" to "pids"

Note also that light-locker settings still does not start up:

"
scott@scott-Asus-M2N68-AM-Plus:~$ /usr/bin/light-locker-settings
/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py:29: 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/light-locker-settings.py", line 697, in <module>
    main = LightLockerSettings()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 98, in __init__
    self.init_settings()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 440, in init_settings
    settings = self.gsettings_get_settings()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 276, in gsettings_get_settings
    settings['light-locker-enabled'] = self.get_light_locker_enabled()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 499, in get_light_locker_enabled
    keyfile = self.get_light_locker_autostart()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 384, in get_light_locker_autostart
    self.get_autostart('light-locker.desktop', defaults)
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 358, in get_autostart
    GLib.KeyFileFlags.KEEP_TRANSLATIONS)
GLib.Error: g-key-file-error-quark: Valid key file could not be found in search dirs (2)
"

I suppose this is YAB (Yet Another Bug). Is THIS bug known by anyone?

-Scott Jacobs

Changed in light-locker-settings (Ubuntu):
importance: Undecided → Medium
Changed in hundredpapercuts:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Scott Cowles Jacobs (scott092707) wrote :

Well, since I manually altered the entries in /usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py
for both lines from get_pid_list to pids
AND the bug I reported here is unchanged ("GLib.Error: g-key-file-error-quark: Valid key file could not be found in search dirs (2)") [see top of page, and also END of #7]
Then this bug is NOT "a duplicate of bug #1574544",
and needs to be addressed separately.

Could someone please comment on what key files are and why LLS cannot find them "in search dirs (2)"?

Thank you.

Revision history for this message
Scott Cowles Jacobs (scott092707) wrote :

Well, the new version of light-locker-settings was offered today (1.5.0-0ubuntu1.1), and I installed it.

1. I note that unlike the earlier poster, who said a change was needed from:

    for pid in psutil.get_pid_list():
to:
    for pid in psutil.pids()

the fix released was actually changed to:

    for pid in psutil_get_pids():

2. As expected, this does nothing to solve this bug (#1586710), which as noted above,
likewise causes l-l-s not to start, but fails with "GLib.Error: g-key-file-error-quark: Valid key file could not be found in search dirs (2)" from the terminal.

Revision history for this message
Scott Cowles Jacobs (scott092707) wrote :

Well, I installed today's update of light-locker-settings (1.5.0-0ubuntu1.1),
and although the "get_pid_list" lines of " /usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py" were changed to "get_pids",
this does nothing to solve this particular bug (#1586710),
as although light-locker-settings fails to start, from the terminal it fails with:
"GLib.Error: g-key-file-error-quark: Valid key file could not be found in search dirs (2)",
as previously noted in the comments above...

Revision history for this message
Scott Cowles Jacobs (scott092707) wrote :

"Remember, this bug report is a duplicate of bug #1607481."

Well, actually, since this bug was filed two months before #1607481,
and the terminal output (or relevant portion thereof) was given in the
initial report, I might have expected bug #1607481' to be listed as a
duplicate of this bug...

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.