Author Topic: Python (3.4.3-2) applications (Menu Editor) fail to launch  (Read 1160 times)

0 Members and 1 Guest are viewing this topic.

Offline pjpreilly

  • Neuling
  • *
  • Posts: 20
  • Branch: unstable
  • Desktop: Xfce
  • Kernel: linux3.18.3.1-x86
  • Skill: Intermediate
After a Manjaro unstable update somewhere in the past my Python (3.4.3-2) applications no longer launch. Menu editor (/usr/bin/menulibre) is the most obvious. Any suggestions?
Cursor spins for a second then nothing. When I right click on the file it only has the options to edit it not to execute. Launched from terminal looks like this:

Code: [Select]
[dad@dc-7700 ~]$ sudo /usr/bin/menulibre
[sudo] password for dad:
Traceback (most recent call last):
File "/usr/bin/menulibre", line 34, in <module>
import menulibre
File "/usr/lib/python3.4/site-packages/menulibre/__init__.py", line 23, in <module>
from menulibre import MenulibreApplication
File "/usr/lib/python3.4/site-packages/menulibre/MenulibreApplication.py", line 152, in <module>
if util.getDefaultMenuPrefix() == 'xfce-':
File "/usr/lib/python3.4/site-packages/menulibre/util.py", line 102, in getDefaultMenuPrefix
processes = getProcessList()
File "/usr/lib/python3.4/site-packages/menulibre/util.py", line 78, in getProcessList
for pid in psutil.get_pid_list():
AttributeError: 'module' object has no attribute 'get_pid_list'
[dad@dc-7700 ~]$
« Last Edit: 28. July 2015, 09:46:37 by FadeMind »

Offline xircon

  • Held Mitglied
  • *****
  • Posts: 1064
  • Branch: Unstable
  • Desktop: Plasma
  • GPU Card: Intel 4th gen
  • GPU driver: free
  • Kernel: Always the newest!
  • Skill: Advanced
Re: Python (3.4.3-2) applications (Menu Editor) fail to launch
« Reply #1 on: 27. July 2015, 23:12:25 »
Downgrade python-psutil.

Offline telephone

  • Jr. Mitglied
  • **
  • Posts: 90
  • Desktop: Xfce
  • Skill: Advanced
Re: Python (3.4.3-2) applications (Menu Editor) fail to launch
« Reply #2 on: 28. July 2015, 02:55:50 »
Fix:

Code: [Select]
sudo sed -i -e 's/psutil.get_pid_list()/psutil.pids()/' /usr/lib/python3.4/site-packages/menulibre/util.py

More info:

After a recent update, I noticed that the Menu Editor stopped working. Running "menulibre" from a terminal command line showed the error:
Code: [Select]
  File "/usr/lib/python3.4/site-packages/menulibre/util.py", line 78, in getProcessList
    for pid in psutil.get_pid_list():
AttributeError: 'module' object has no attribute 'get_pid_list'

I checked the Package Manager for "psutil" and found "python-psutil" was installed. Going to the included link https://github.com/giampaolo/psutil and searching for "get_pid_list()" showed
Code: [Select]
  | Old name                 | Replacement                   |
  +==========================+===============================+
  | - psutil.get_pid_list()  | psutil.pids()                 |

I went to "/usr/lib/python3.4/site-packages/menulibre/util.py" and changed "get_pid_list()" to "pids()" on line 78, and voila! the Menu Editor worked again.

I'm posting this in hopes it may save other others some aggravation.

Link: Menu Editor (MenuLibre) stopped working - Solved

Offline pjpreilly

  • Neuling
  • *
  • Posts: 20
  • Branch: unstable
  • Desktop: Xfce
  • Kernel: linux3.18.3.1-x86
  • Skill: Intermediate
Re: Python (3.4.3-2) applications (Menu Editor) fail to launch
« Reply #3 on: 28. July 2015, 03:37:48 »
Cha ching! Pay the Man!

Offline pjpreilly

  • Neuling
  • *
  • Posts: 20
  • Branch: unstable
  • Desktop: Xfce
  • Kernel: linux3.18.3.1-x86
  • Skill: Intermediate
Re: Python (3.4.3-2) applications (Menu Editor) fail to launch
« Reply #4 on: 28. July 2015, 03:40:50 »
Just that one instance?

Offline pjpreilly

  • Neuling
  • *
  • Posts: 20
  • Branch: unstable
  • Desktop: Xfce
  • Kernel: linux3.18.3.1-x86
  • Skill: Intermediate
Re: Python (3.4.3-2) applications (Menu Editor) fail to launch
« Reply #5 on: 28. July 2015, 03:54:07 »
Works for me!