Mic92 / python-mpd2

Python library which provides a client interface for the Music Player Daemon.
GNU Lesser General Public License v3.0
352 stars 119 forks source link

Problem makefile() #163

Closed entuccio closed 3 years ago

entuccio commented 3 years ago

I got this error:

makefile() got an unexpected keyword argument 'newline'

What is my mistake? Can I use this library in Python 2.7?

Thanks

entuccio commented 3 years ago

2243 ERROR makefile() got an unexpected keyword argument 'newline' Traceback (most recent call last): File "/Users/daniele/MyGoogleDrive/Alfred.alfredpreferences/workflows/user.workflow.1A3A1E44-FE8F-4F25-8EEE-E281EE9BCA96/lib/workflow/workflow.py", line 2236, in run func(self) File "./test.py", line 28, in main client.connect("localhost", 6600) # connect to localhost:6600 File "/Users/daniele/MyGoogleDrive/Alfred.alfredpreferences/workflows/user.workflow.1A3A1E44-FE8F-4F25-8EEE-E281EE9BCA96/mpd/base.py", line 797, in connect self._rbfile = self._sock.makefile("rb", newline="\n") TypeError: makefile() got an unexpected keyword argument 'newline'

Mic92 commented 3 years ago

python 2 support was dropped in https://github.com/Mic92/python-mpd2/releases/tag/v2.0.0

Please upgrade your python version, we don't provide support for older versions anymore.

entuccio commented 3 years ago

Thank you. What if I use a previous version? (like 1.0) ?

Mic92 commented 3 years ago

yes. That would work, but we won't add new features or bug fixes to previous versions so you are on your own.

entuccio commented 3 years ago

Thank you dear. Great work.