LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Radiotray on current compiles but won't run (https://www.linuxquestions.org/questions/slackware-14/radiotray-on-current-compiles-but-wont-run-4175657258/)

cdek 07-12-2019 04:03 AM

Radiotray on current compiles but won't run
 
I am able to build and install radiotray on current, but it won't run. This is the error I get after launching:

Code:

➜  ~ radiotray
** Message: 10:51:09.890: pygobject_register_sinkfunc is deprecated (GstObject)
/usr/lib64/python2.7/site-packages/radiotray/AudioPlayerGStreamer.py:51: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
  if(cfg_provider._settingExists("buffer_size")):
/usr/lib64/python2.7/site-packages/radiotray/SysTrayGui.py:49: GtkWarning: Unable to locate theme engine in module_path: "murrine",
  self.radioMenu = gtk.Menu()
Sleep Timer, Stops playing after a predefined time, SleepTimerPlugin.py, Carlos Ribeiro
HelloWorld, This is a test plugin, HelloWorld.py, Carlos Ribeiro
started
Notifications, Shows message notifications on the desktop, NotificationPlugin.py, Carlos Ribeiro
Traceback (most recent call last):
  File "/usr/bin/radiotray", line 15, in <module>
    radiotray.main(sys.argv[1:])
  File "/usr/lib64/python2.7/site-packages/radiotray/radiotray.py", line 39, in main
    RadioTray()
  File "/usr/lib64/python2.7/site-packages/radiotray/RadioTray.py", line 114, in __init__
    self.pluginManager.discoverPlugins()
  File "/usr/lib64/python2.7/site-packages/radiotray/PluginManager.py", line 127, in discoverPlugins
    m = __import__(info.clazz)
  File "/usr/share/radiotray/plugins/NotificationPlugin.py", line 25, in <module>
    import pynotify
ImportError: No module named pynotify

"pynotify" is delivered in 14.2 by notify-python

Code:

cat /var/adm/packages/notify-python-0.1.1-x86_64-5
PACKAGE NAME:    notify-python-0.1.1-x86_64-5
COMPRESSED PACKAGE SIZE:    19.0K
UNCOMPRESSED PACKAGE SIZE:    90K
PACKAGE LOCATION: /var/log/mount/slackware64/l/notify-python-0.1.1-x86_64-5.txz
PACKAGE DESCRIPTION:
notify-python: notify-python (Python bindings for libnotify)
notify-python:
notify-python: The notify-python package contains bindings to use libnotify with
notify-python: Python programs.
notify-python:
notify-python: Homepage for notify-python:  http://www.galago-project.org/
notify-python:
notify-python:
notify-python:
notify-python:
notify-python:
FILE LIST:
./
install/
install/slack-desc
usr/
usr/doc/
usr/doc/notify-python-0.1.1/
usr/doc/notify-python-0.1.1/AUTHORS
usr/doc/notify-python-0.1.1/COPYING
usr/doc/notify-python-0.1.1/ChangeLog
usr/doc/notify-python-0.1.1/INSTALL
usr/doc/notify-python-0.1.1/NEWS
usr/doc/notify-python-0.1.1/README
usr/lib64/
usr/lib64/pkgconfig/
usr/lib64/pkgconfig/notify-python.pc
usr/lib64/python2.7/
usr/lib64/python2.7/site-packages/
usr/lib64/python2.7/site-packages/gtk-2.0/
usr/lib64/python2.7/site-packages/gtk-2.0/pynotify/
usr/lib64/python2.7/site-packages/gtk-2.0/pynotify/__init__.py
usr/lib64/python2.7/site-packages/gtk-2.0/pynotify/__init__.pyc
usr/lib64/python2.7/site-packages/gtk-2.0/pynotify/__init__.pyo
usr/lib64/python2.7/site-packages/gtk-2.0/pynotify/_pynotify.la
usr/lib64/python2.7/site-packages/gtk-2.0/pynotify/_pynotify.so
usr/share/
usr/share/pygtk/
usr/share/pygtk/2.0/
usr/share/pygtk/2.0/defs/
usr/share/pygtk/2.0/defs/pynotify.defs

However, in current "notify-python" is replaced by "python-notify2", breaking radiotray

Code:

cat /var/adm/packages/python-notify2-0.3.1-x86_64-3
PACKAGE NAME:    python-notify2-0.3.1-x86_64-3
COMPRESSED PACKAGE SIZE:    11.5K
UNCOMPRESSED PACKAGE SIZE:    80K
PACKAGE LOCATION: /usb-stick/slackware64/l/python-notify2-0.3.1-x86_64-3.txz
PACKAGE DESCRIPTION:
python-notify2: python-notify2 (Python interface to DBus notifications)
python-notify2:
python-notify2: This is a pure-python replacement for notify-python, using python-dbus
python-notify2: to communicate with the notifications server directly. It's compatible
python-notify2: with Python 2 and 3, and its callbacks can work with Gtk 3 or Qt 4
python-notify2: applications.
python-notify2:
python-notify2: Homepage: https://pypi.python.org/pypi/notify2
python-notify2:
python-notify2:
python-notify2:
FILE LIST:
./
install/
install/slack-desc
usr/
usr/doc/
usr/doc/python-notify2-0.3.1/
usr/doc/python-notify2-0.3.1/LICENSE
usr/doc/python-notify2-0.3.1/PKG-INFO
usr/lib64/
usr/lib64/python2.7/
usr/lib64/python2.7/site-packages/
usr/lib64/python2.7/site-packages/notify2-0.3.1-py2.7.egg-info
usr/lib64/python2.7/site-packages/notify2.py
usr/lib64/python2.7/site-packages/notify2.pyc
usr/lib64/python3.7/
usr/lib64/python3.7/site-packages/
usr/lib64/python3.7/site-packages/__pycache__/
usr/lib64/python3.7/site-packages/__pycache__/notify2.cpython-37.pyc
usr/lib64/python3.7/site-packages/notify2-0.3.1-py3.7.egg-info
usr/lib64/python3.7/site-packages/notify2.py

Is there a solution for this?

ponce 07-12-2019 04:18 AM

I suppose you can just build and install the old notify-python using the sources for 14.2

http://slackware.osuosl.org/slackwar...notify-python/

Labinnah 07-12-2019 04:29 AM

You can use pip or pip3 to install missing python modules. In your case:
Code:

pip install notify
"pip" is for python 2.X and "pip3" for python 3.X.

cdek 07-13-2019 12:34 AM

For the pip method, it should be

Code:

# pip install pynotify
and then it works.

But I read that it's better to use pip in a virtual environment only, so I build it as suggested by ponce.

I'm very happy that radiotray is working now. It's such a useful and unassuming little program. Thanks!


All times are GMT -5. The time now is 07:27 AM.