On Mon, May 19, 2008 at 08:52:40PM +0200, Michal ??iha?? wrote: > Maybe python-mpd author has an idea why gmpc (python-mpdclient) works > and sonata (python-mpd) not?
gmpc is actually written in C, and uses libmpd (a high level abstraction based on libmpdclient). It doesn't use Python at all, let alone python-mpdclient. Anyway, the exception is being raised because it's expecting to read a full line, and only getting a partial one. This is supposed to indicate the end of a stream, or in the case of a socket, that the remote host has closed the connection (since a connection problem would raise socket.error). This should never actually happen with MPD, which leads me to believe it's a bug in Sonata. It could be supressing a connection error and incorrectly trying to use the broken connection. In *most* cases that should also result in a socket.error exception, but I imagine there are others where it won't. In any case, I'd report this to the Sonata author.
pgpBXLKHYOV3X.pgp
Description: PGP signature