Mpd error with python 2 and 3

Hi guys! I’m trying to print song information true ssh.
I follow the script here [Solved] LCD Track Information Problem but i got an error with python 2.

client.connect(‘localhost’, 6600) # connect to localhost:6600
File “build/bdist.linux-armv7l/egg/mpd/”, line 795, in connect
TypeError: makefile() got an unexpected keyword argument ‘newline’

also with python3 i got an error

Traceback (most recent call last):
File “”, line 3, in
from mpd import MPDClient
File “/usr/local/lib/python3.4/dist-packages/”, line 399
except socket.error, err:
any suggest?