klattimer / LGWebOSRemote

Command line webOS remote for LGTVs
MIT License
498 stars 97 forks source link

Receiving following message: TypeError: __init__() got an unexpected keyword argument 'exclude_headers' #1

Closed deepcoder closed 7 years ago

deepcoder commented 7 years ago

python lgtv.py auth 192.168.2.253 Traceback (most recent call last): File "lgtv.py", line 478, in ws = LGTVClient(sys.argv[2]) File "lgtv.py", line 215, in init super(LGTVClient, self).init('ws://' + self.__hostname + ':3000/', exclude_headers=["Origin"]) TypeError: init() got an unexpected keyword argument 'exclude_headers'

klattimer commented 7 years ago

You'll need to use git+https://github.com/klattimer/WebSocket-for-Python.git#egg=ws4py for ws4py

Or you can use their repository, the patch was upstreamed sometime ago, they haven't made a release.

It would also help if you looked at the readme file, because that's the URL from the requirements.txt file and if you followed the install procedure it would have worked.

jvance325 commented 6 years ago

I just started with a brand new Ubuntu 16.04 VM and followed your instructions to perfectly. I am using Pythong 2.7.12. When executing python lgtv.py auth "IP Address," I am receiving this same error message. Can you point me in the correct direct in order to resolve it?

klattimer commented 6 years ago

Your ws4py is out of date, try using their git master as they've certainly upstreamed my patch at this point.

klattimer commented 6 years ago

Please read the previous comments before asking further questions, the answer is already there.