Error in urllib?

100 views
Skip to first unread message

Mikael Gustafsson

unread,
Sep 30, 2015, 8:16:41 AM9/30/15
to pysqueezecenter-discuss
Dear all,

First of all I hope this still gets read by someone. And second; yes, I'm horribly inexperienced in python, so the issue might be trivial.
My issue is as follows:
I first installed PyLMS from PyPI and got everything working after changing the indentation on line 607 in player.py. Tried running a query with request_with_results, which naturally wasn't working. Discovered that the version on GitHub is newer and downloaded that as a zip and installed it using "setup.py install". Now I run into the following error message when trying to run tests.py:

Traceback (most recent call last):
  File "C:\Users\Mixu\AppData\Local\Programs\Python\Python35\Lib\site-packages\pylms\tests.py", line 6, in <module>
    s.connect()
  File "C:\Users\Mixu\AppData\Local\Programs\Python\Python35\lib\site-packages\pylms\server.py", line 62, in connect
    self.login()
  File "C:\Users\Mixu\AppData\Local\Programs\Python\Python35\lib\site-packages\pylms\server.py", line 78, in login
    result = self.request("login %s %s" % (self.username, self.password))
  File "C:\Users\Mixu\AppData\Local\Programs\Python\Python35\lib\site-packages\pylms\server.py", line 89, in request
    response = self.__decode(self.__unquote(response))
  File "C:\Users\Mixu\AppData\Local\Programs\Python\Python35\lib\site-packages\pylms\server.py", line 255, in __unquote
    return urllib.parse.unquote(text, encoding=self.charset)
  File "C:\Users\Mixu\AppData\Local\Programs\Python\Python35\lib\urllib\parse.py", line 537, in unquote
    if '%' not in string:
TypeError: a bytes-like object is required, not 'str'

I'm clueless. Any help?

Mikael
Reply all
Reply to author
Forward
0 new messages