Here my two cents, inspired by the Debian bug https://bugs.debian.org
/cgi-bin/bugreport.cgi?bug=801232 which is not necessarily the same
thing but mentions a nice debug command: "from radiotray import
radiotray_runner" (see below)

[HACK] So the hack is clearly installing apt-get install python-xdg
[SOLUTION] The solution is adding python-xdg to Depends

[CROSS-LINK] Btw the bug is very similar to Bug 55179

I have two machines: one was upgraded from wily to xenial, there the
problem didn't appear as the package was already installed. Only on a
fresh xenial installation the problem appeared. My flavour is Xubuntu,
it's possible that Ubuntu flavour already contains the missing package.

me$ radiotray 
/usr/lib/python2.7/dist-packages/radiotray/XmlDataProvider.py:23: 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
Traceback (most recent call last):
  File "/usr/bin/radiotray", line 12, in <module>
    os.chdir(workdir)
OSError: [Errno 2] No such file or directory: '/usr/bin/src'


me$ python
Python 2.7.11+ (default, Apr 17 2016, 14:00:29) 
[GCC 5.3.1 20160413] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from radiotray import radiotray_runner
/usr/lib/python2.7/dist-packages/radiotray/XmlDataProvider.py:23: 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
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/radiotray/radiotray_runner.py", line 
6, in <module>
    from RadioTray import RadioTray
  File "/usr/lib/python2.7/dist-packages/radiotray/RadioTray.py", line 22, in 
<module>
    from AudioPlayerGStreamer import AudioPlayerGStreamer
  File "/usr/lib/python2.7/dist-packages/radiotray/AudioPlayerGStreamer.py", 
line 36, in <module>
    from StreamDecoder import StreamDecoder
  File "/usr/lib/python2.7/dist-packages/radiotray/StreamDecoder.py", line 21, 
in <module>
    from lib.common import USER_AGENT
  File "/usr/lib/python2.7/dist-packages/radiotray/lib/common.py", line 5, in 
<module>
    from xdg.BaseDirectory import xdg_data_home
ImportError: No module named xdg.BaseDirectory
>>> quit()

me$ apt-get install python-xdg
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
me$ sudo apt-get install python-xdg
[sudo] password for daniel: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  python-xdg
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 31.4 kB of archives.
After this operation, 184 kB of additional disk space will be used.
Get:1 http://ch.archive.ubuntu.com/ubuntu xenial/universe amd64 python-xdg all 
0.25-4 [31.4 kB]
Fetched 31.4 kB in 0s (131 kB/s)
Selecting previously unselected package python-xdg.
(Reading database ... 175769 files and directories currently installed.)
Preparing to unpack .../python-xdg_0.25-4_all.deb ...
Unpacking python-xdg (0.25-4) ...
Setting up python-xdg (0.25-4) ...

me$ radiotray 
/usr/lib/python2.7/dist-packages/radiotray/XmlDataProvider.py:23: 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
/usr/lib/python2.7/dist-packages/radiotray/AudioPlayerGStreamer.py:64: 
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/lib/python2.7/dist-packages/radiotray/SysTray.py:100: PyGIWarning: 
AppIndicator3 was imported without specifying a version first. Use 
gi.require_version('AppIndicator3', '0.1') before import to ensure that the 
right version gets loaded.
  from gi.repository import AppIndicator3
Sleep Timer, Stops playing after a predefined time, SleepTimerPlugin.py, Carlos 
Ribeiro
StationSwitcher, Allows cycling through stations, StationSwitcherPlugin.py, 
Mark F
HelloWorld, This is a test plugin, HelloWorld.py, Carlos Ribeiro
started
[...]

** Bug watch added: Debian Bug tracker #801232
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=801232

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1557115

Title:
  [regression] RadioTray won't launch without python-xdg

To manage notifications about this bug go to:
https://bugs.launchpad.net/gtk/+bug/1557115/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to