Ape / samsungctl

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

Couldn't run Samsungctl. #52

Closed ghost closed 7 years ago

ghost commented 7 years ago

This error shows up.

samsungctl --host 192.168.1.2 key KEY_POWER Traceback (most recent call last): File "/home/pi/.local/bin/samsungctl", line 11, in <module> sys.exit(main()) File "/home/pi/.local/lib/python2.7/site-packages/samsungctl/__main__.py", line 92, in main config = _read_config() File "/home/pi/.local/lib/python2.7/site-packages/samsungctl/__main__.py", line 37, in _read_config except FileNotFoundError: NameError: global name 'FileNotFoundError' is not defined

When commented the FileNotfoundError exception New error popped up

samsungctl --host 192.168.1.2 key KEY_POWER
Traceback (most recent call last):
  File "/home/pi/.local/bin/samsungctl", line 11, in <module>
    sys.exit(main())
  File "/home/pi/.local/lib/python2.7/site-packages/samsungctl/__main__.py", line 93, in main
    config = _read_config()
  File "/home/pi/.local/lib/python2.7/site-packages/samsungctl/__main__.py", line 46, in _read_config
    with config_file:
UnboundLocalError: local variable 'config_file' referenced before assignment

PS:I used pip for installation.

Ape commented 7 years ago

Samsungctl requires Python 3.