kdschlosser / samsungctl

Remote control Samsung televisions via a TCP/IP connection
MIT License
154 stars 33 forks source link

TypeError: can only concatenate str (not "bytes") to str #70

Closed andreas-bulling closed 5 years ago

andreas-bulling commented 5 years ago
page: <?xml version="1.0" encoding="UTF-8"?><service xmlns="urn:dial-multiscreen-org:schemas:dial" xmlns:atom="http://www.w3.org/2005/Atom"><name>CloudPINPage</name><options allowStop="true"/><state>stopped</state><atom:link rel="run" href="run"/></service>
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/andreas/Desktop/samsungctl/samsungctl/remote.py", line 74, in __call__
    return RemoteWrapper(conf)
  File "/Users/andreas/Desktop/samsungctl/samsungctl/remote.py", line 72, in __init__
    self.open()
  File "/Users/andreas/Desktop/samsungctl/samsungctl/utils.py", line 24, in wrapper
    return func(*args, **kwargs)
  File "/Users/andreas/Desktop/samsungctl/samsungctl/remote_encrypted/__init__.py", line 148, in open
    self.start_pairing()
  File "/Users/andreas/Desktop/samsungctl/samsungctl/utils.py", line 24, in wrapper
    return func(*args, **kwargs)
  File "/Users/andreas/Desktop/samsungctl/samsungctl/remote_encrypted/__init__.py", line 282, in start_pairing
    self.show_pin_page()
  File "/Users/andreas/Desktop/samsungctl/samsungctl/utils.py", line 24, in wrapper
    return func(*args, **kwargs)
  File "/Users/andreas/Desktop/samsungctl/samsungctl/remote_encrypted/__init__.py", line 240, in show_pin_page
    print('show_pin_page: ' + response.content)
TypeError: can only concatenate str (not "bytes") to str
andreas-bulling commented 5 years ago

fix: print('show_pin_page: ' + response.content.decode("utf-8") )

andreas-bulling commented 5 years ago

and: print('websocket_response: ' + websocket_response.content.decode("utf-8") )