miracle2k / onkyo-eiscp

Control Onkyo A/V receivers over the network; usuable as a script, or as a Python library.
MIT License
466 stars 110 forks source link

Works standalone or in bash script but get error calling from another app #116

Closed Lorccan closed 4 years ago

Lorccan commented 4 years ago

I have my receiver (TX-NR686) at a fixed IP address: 10.0.1.200

onkyo --host 10.0.1.200 'system-power:on' works fine from the command line and when called in a bash script, but when I try to call the same command from another app (homebridge) I get this error:

Mar 22 16:40:03 naxos homebridge[2919]: [3/22/2020, 16:40:03] [CMD Switch] Traceback (most recent call last):
File "/home/pi/.local/bin/onkyo", line 6, in <module>
from eiscp.script import run
ImportError: No module named eiscp.script

The same thing happens if I substitute the command with a script (and when I fully-qualify the path to 'onkyo' in both places).

Does anyone have any idea how I can solve please?

Lorccan commented 4 years ago

Fixed: I had been unable to use easy_install, so I used pip instead. Problem is that this defaulted to Python 3.x

Solution was to reinstall with sudo pip2 install onkyo-eiscp