klattimer / LGWebOSRemote

Command line webOS remote for LGTVs
MIT License
511 stars 99 forks source link

Arguments are broken #118

Closed xf- closed 10 months ago

xf- commented 1 year ago

Problem

The CLI worked fine for long time, but now every command with argument fails

<tv_name> startApp <appid>

results in

Error: Argument lengths do not match

Tried zsh and bash (just to avoid some unrelated issue).

Version

514be54 build on Arch and rebuild just now to avoid more unrelated issues.

Python

python --version
Python 3.10.10

Workaround for me

Generated __init__.py skips the 3rd argument args = parseargs(sys.argv[2], sys.argv[4:])

jepes1981 commented 1 year ago

same issue with the recent pull, the work around is already in the code but still same error. I have very basic knowledge with python but will try to debug.

Workaround for me Generated __init__.py skips the 3rd argument args = parseargs(sys.argv[2], sys.argv[4:])

klattimer commented 10 months ago

I believe this is fixed in a recently merged PR.

xf- commented 10 months ago

@klattimer The error is gone, but it feels completely broken. I get no output at all.

Existing config

(No IP change - I can ping and scan it)

lgtv TV swInfo

After deleting config

Output for auth

Traceback (most recent call last):
  File "/usr/bin/lgtv", line 33, in <module>
    sys.exit(load_entry_point('LGTV==0.3', 'console_scripts', 'lgtv')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/LGTV/__init__.py", line 160, in main
    ws.connect()
  File "/usr/lib/python3.11/site-packages/ws4py/client/__init__.py", line 224, in connect
    bytes = self.sock.recv(128)
            ^^^^^^^^^^^^^^^^^^^
ConnectionResetError: [Errno 104] Connection reset by peer
Tenzer commented 10 months ago

@xf- You now need to run the commands as lgtv --name TV swInfo or lgtv -n TV swInfo.

xf- commented 10 months ago

Done - works for me - other issue was SSL related.

Created a new issue regarding maybe adding default arguments for SSL and TV name argument in config.