Hiro
Posts: 78
Joined: Fri Dec 30, 2011 11:09 am

Radiotray

Fri Oct 04, 2013 7:23 pm

I've been using Radiotray for some time to listen to internet radio stations. However i have just switched to the latest release of Raspbian and can't get it to work any more.
The installation was ok but when i click on the icon in the menu nothing appears. When i run it from the command line i get the following error.

Code: Select all

Traceback (most recent call last):
  File "/usr/bin/radiotray", line 15, in <module>
    radiotray.main(sys.argv[1:])
  File "/usr/lib/python2.7/dist-packages/radiotray/radiotray.py", line 37, in main
    RadioTray()
  File "/usr/lib/python2.7/dist-packages/radiotray/RadioTray.py", line 46, in __init__
    self.loadConfiguration()
  File "/usr/lib/python2.7/dist-packages/radiotray/RadioTray.py", line 130, in loadConfiguration        os.mkdir(USER_CFG_PATH)
OSError: [Errno 2] No such file or directory: '/home/pi/.local/share/radiotray'
Does any of that mean anything to anyone?
Cheers, Hiro.

johny
Posts: 58
Joined: Tue Apr 24, 2012 10:00 am
Location: Australia

Re: Radiotray

Sat Oct 05, 2013 1:48 am

It looks like the software was built/installed with a PREFIX of "$HOME/.", which results in the config path "/home/pi/.local/share/radiotray". Normally I'd expect to see something like "/usr/local/share/radiotray" there. You should be able to work around it by running
mkdir -p $HOME/.local/share/radiotray
I think. At the very least it should get you to a different error :)

Disclaimer: I'd never heard of "radiotray" before reading your post - the above is just conjecture based on general experience.

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: Radiotray

Sat Oct 05, 2013 2:17 pm

Looking at line 130 of http://sourceforge.net/p/radiotray/code ... dioTray.py I'd say that it's a bug in that it should be using http://docs.python.org/2/library/os.html#os.makedirs instead of os.mkdir

But the workaround johny posted looks fine.

Hiro
Posts: 78
Joined: Fri Dec 30, 2011 11:09 am

Re: Radiotray

Sat Oct 05, 2013 4:04 pm

I did as you suggested johny and now the program starts fine. However when i try to play any stream i get the following:

Code: Select all

['genre', 'organization', 'station']
{'genre': u'Classic Rock', 'organization': u'Planet Rock', 'station': 'Planet Rock'}
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/radiotray/AudioPlayerGStreamer.py", line 145, in on_message
    self.eventManager.notify(EventManager.STATE_CHANGED, {'state':'playing', 'station':station})
  File "/usr/lib/python2.7/dist-packages/radiotray/events/EventManager.py", line 46, in notify
    callback(data)
  File "/usr/lib/python2.7/dist-packages/radiotray/NotificationManager.py", line 35, in on_state_changed
    self.eventManagerWrapper.notify(_('Radio Tray Playing'), station)
  File "/usr/lib/python2.7/dist-packages/radiotray/events/EventMngNotificationWrapper.py", line 31, in notify
    self.eventManager.notify(self.eventManager.NOTIFICATION, {'title': title, 'message':message})
  File "/usr/lib/python2.7/dist-packages/radiotray/events/EventManager.py", line 46, in notify
    callback(data)
  File "/usr/share/radiotray/plugins/NotificationPlugin.py", line 54, in on_notification
    self.notify(data['title'], data['message'])
  File "/usr/share/radiotray/plugins/NotificationPlugin.py", line 71, in notify
    self.notif.show()
glib.GError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files
['genre', 'organization', 'station']
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/radiotray/AudioPlayerGStreamer.py", line 160, in on_message
    self.eventManager.notify(EventManager.SONG_CHANGED, metadata)
  File "/usr/lib/python2.7/dist-packages/radiotray/events/EventManager.py", line 46, in notify
    callback(data)
  File "/usr/lib/python2.7/dist-packages/radiotray/NotificationManager.py", line 56, in on_song_changed
    self.eventManagerWrapper.notify(msgTitle, msg)
  File "/usr/lib/python2.7/dist-packages/radiotray/events/EventMngNotificationWrapper.py", line 31, in notify
    self.eventManager.notify(self.eventManager.NOTIFICATION, {'title': title, 'message':message})
  File "/usr/lib/python2.7/dist-packages/radiotray/events/EventManager.py", line 46, in notify
    callback(data)
  File "/usr/share/radiotray/plugins/NotificationPlugin.py", line 54, in on_notification
    self.notify(data['title'], data['message'])
  File "/usr/share/radiotray/plugins/NotificationPlugin.py", line 77, in notify
    self.notif.show()
glib.GError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/radiotray/AudioPlayerGStreamer.py", line 137, in on_message
    self.eventManager.notify(EventManager.STATION_ERROR, {'error':debug})
  File "/usr/lib/python2.7/dist-packages/radiotray/events/EventManager.py", line 46, in notify
    callback(data)
  File "/usr/lib/python2.7/dist-packages/radiotray/NotificationManager.py", line 60, in on_station_error
    self.eventManagerWrapper.notify(_('Radio Error'), str(data['error']))
  File "/usr/lib/python2.7/dist-packages/radiotray/events/EventMngNotificationWrapper.py", line 31, in notify
    self.eventManager.notify(self.eventManager.NOTIFICATION, {'title': title, 'message':message})
  File "/usr/lib/python2.7/dist-packages/radiotray/events/EventManager.py", line 46, in notify
    callback(data)
  File "/usr/share/radiotray/plugins/NotificationPlugin.py", line 54, in on_notification
    self.notify(data['title'], data['message'])
  File "/usr/share/radiotray/plugins/NotificationPlugin.py", line 77, in notify
    self.notif.show()
glib.GError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files
@AndrewS, I think i understand you, i think it is acceptable to alter a .py program once it is installed so i opened /usr/share/pyshared/radiotray/RadioTray.py and changed line 130 (&133) as you mentioned but still the same so i changed it back again.
Thanks for the help so far, Hiro.

johny
Posts: 58
Joined: Tue Apr 24, 2012 10:00 am
Location: Australia

Re: Radiotray

Sat Oct 05, 2013 11:32 pm

Just going by the error messages, it looks like "jackd" isn't installed and/or running. Maybe try "sudo apt-get install jackd"?
The desktop notification related stuff in that output *should* be harmless, I think.

Hiro
Posts: 78
Joined: Fri Dec 30, 2011 11:09 am

Re: Radiotray

Sun Oct 06, 2013 9:26 am

I have managed to clear up the error messages starting "Glib.GError" by installing the notification daemon. It hasn't made the program work any better but the error is now shrunk to:

Code: Select all

['genre', 'organization', 'station']
{'genre': u'Classic Rock', 'organization': u'Planet Rock', 'station': 'Planet Rock'}
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
['genre', 'organization', 'station']
{'genre': u'Classic Rock', 'organization': u'Planet Rock', 'station': 'Planet Rock'}

So it does indeed look like a jack server error although i'm not sure what that means. Apt-get tells me jackd is installed and up to date, if i type jackd at the prompt i get told it's version 1.9.9 and it lists the usage options as it should. I removed and re-installed jackd but no difference. Is there a way to tell if the server is actually running?
"dpkg --get-selections | grep jackd" tells me i have jackd,jackd2 and libjack-jackd2-0:armhf all installed, is this all i need?
Any ideas? Cheers, Hiro.

johny
Posts: 58
Joined: Tue Apr 24, 2012 10:00 am
Location: Australia

Re: Radiotray

Sun Oct 06, 2013 11:12 am

I've reached the end of my knowledge here - I never really dealt much with sound under Linux, so I have nothing useful to add, sorry. Let's hope someone else can chip in!

Hiro
Posts: 78
Joined: Fri Dec 30, 2011 11:09 am

Re: Radiotray

Sun Oct 06, 2013 11:58 am

Thanks for your help johny, hopefully somebody will be able to help. I think i should just mention that i do have working sound, MPG123 plays MP3 files fine from the command line.

Return to “Troubleshooting”