You are not logged in.
Hey folks!
I'm sorry if this topic was already discussed, but i was not able to find it using the board search!
My setup: mpd with ncmpcpp as frontend. Due to some problems with mpdscribble I switched to lastfmsubmitd with lastmp as bridge.
Versions:
* mpd 0.15.12-1
* ncmpcpp 0.5.5-1
* lastfmsubmitd 1.0.6-1
When I clear my current playlist with 'c' in ncmpcpp, i get an error in /var/log/lastfm/lastmp.log and this deamon exits:
2010-09-21 22:09:39,419 lastmp[4035] ERROR: Aborting: Traceback (most recent call last):
File "/usr/bin/lastmp", line 237, in <module>
daemon(cli)
File "/usr/bin/lastmp", line 196, in daemon
mo.observe()
File "/usr/bin/lastmp", line 153, in observe
self.wake()
File "/usr/bin/lastmp", line 78, in wake
song = Song(self.mpd.do.currentsong())
File "/usr/bin/lastmp", line 29, in __init__
self.artist = getattr(sobj, 'artist', '')
File "/usr/lib/python2.6/site-packages/mpdclient2.py", line 270, in __getattr__
return self[attr]
KeyError: 'artist'As you can imagine: it is quite annoying, if you clear your playlists and every further title is not submitted to last.fm due to this error... Does anyone know how to fix this problem?
Cheers and thanks!
Chris
Last edited by NecroWxrst (2010-09-21 20:20:13)
Offline
I have the same problem, but I didn't noticed the reason - clearing the playlist. I thought that crash happens randomly.
I think we should post a bug report to the program author.
P.S. My mpd client is ncmpc.
Offline
Hey there!
If I'm not the only one with this problem, I think it would be the best to send a bug-report to the author. But where can I report this issue? When I search the Internet for lastmp or lastfmsubmitd, I get this homepage without contact information or bug-tracker: http://www.red-bean.com/decklin/lastfmsubmitd/
Greetz
Chris
Offline
There is an e-mail in "man lastfmsubmitd":
Decklin Foster <decklin@red-bean.com>
Offline
Hey there!
Thanks for the email! The manpage did not come to my mind. I'll write an email to him and post his reply here.
Cheers
Chris
Offline
There's also a program called scrobby. It's written by the guy who wrote ncmpcpp. I've been using this scrobbler for quite a while (about 2 years I guess) and I never had any trouble with it.
Offline
In the meantime you can edit /usr/bin/lastmp and exchange the first few lines of class Song with the following snippet. Working fine for me and lastmp is surviving playlist clears.
class Song:
def __init__(self, sobj):
self.artist = ''
if hasattr(sobj, 'artist'):
self.artist = getattr(sobj, 'artist')
self.title = ''
if hasattr(sobj, 'title'):
self.title = getattr(sobj, 'title')
self.album = ''
if hasattr(sobj, 'album'):
self.album = getattr(sobj, 'album')
self.time = int(0)
if hasattr(sobj, 'time'):
self.length = int(getattr(sobj, 'time'))
self.file = ''
if hasattr(sobj, 'file'):
self.file = getattr(sobj, 'file')I already wrote an email to the author with the suggested change but didn't get a reply so far.
Offline
Hey sLite!
Thank you for the patch! But since the author of lastmp did not reply to my email i switched to scrobby which works quite fine (;
Cheers
Chris
Offline
There's also a program called scrobby. It's written by the guy who wrote ncmpcpp. I've been using this scrobbler for quite a while (about 2 years I guess) and I never had any trouble with it.
Scrobby is great. Thanks man! I've been looking for something simple and reliable like this for ages.
Offline