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

Trouble utf8 ? #118

Open gtrhayrug opened 4 years ago

gtrhayrug commented 4 years ago

I'm using onkyo-eiscp since few months ... but since few days, any command do not work...

I've tried to update it, python etc... always the same error message... Using a Debian 9 updated and python 3.5.

Traceback (most recent call last): File "/usr/local/bin/onkyo", line 11, in <module> load_entry_point('onkyo-eiscp==1.2.7', 'console_scripts', 'onkyo')() File "/usr/local/lib/python3.5/dist-packages/onkyo_eiscp-1.2.7-py3.5.egg/eiscp/script.py", line 179, in run File "/usr/local/lib/python3.5/dist-packages/onkyo_eiscp-1.2.7-py3.5.egg/eiscp/script.py", line 55, in main File "/usr/local/lib/python3.5/dist-packages/onkyo_eiscp-1.2.7-py3.5.egg/eiscp/core.py", line 339, in discover File "/usr/local/lib/python3.5/dist-packages/onkyo_eiscp-1.2.7-py3.5.egg/eiscp/core.py", line 274, in parse_info File "/usr/local/lib/python3.5/dist-packages/onkyo_eiscp-1.2.7-py3.5.egg/eiscp/core.py", line 88, in parse UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 35: invalid start byte

My python 3.5 is updated to the last version using pip upgrade features on my debian 9.

Any idea ?

sudo /usr/bin/python3 -m pip install --upgrade pip Collecting pip Downloading pip-20.1.1-py2.py3-none-any.whl (1.5 MB) |████████████████████████████████| 1.5 MB 435 kB/s Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 20.1 Uninstalling pip-20.1: Successfully uninstalled pip-20.1 Successfully installed pip-20.1.1

10w73 commented 3 years ago

Same for me. Were you able to fix or workaround it?

zeha commented 3 years ago

Hi,

the data you've provided is not enough to diagnose further. Please, if you can, provide at least:

pbreizh29 commented 3 years ago

I have the same issue either on the hassio docker or a debian VM here the trace

Traceback (most recent call last): File "/usr/local/bin/onkyo", line 10, in sys.exit(run()) File "/usr/local/lib/python2.7/dist-packages/eiscp/script.py", line 179, in run sys.exit(main() or 0) File "/usr/local/lib/python2.7/dist-packages/eiscp/script.py", line 100, in main receivers = eISCP.discover(timeout=1) File "/usr/local/lib/python2.7/dist-packages/eiscp/core.py", line 339, in discover info = parse_info(data) File "/usr/local/lib/python2.7/dist-packages/eiscp/core.py", line 274, in parse_info response = eISCPPacket.parse(data) File "/usr/local/lib/python2.7/dist-packages/eiscp/core.py", line 88, in parse data = bytes[h.header_size:h.header_size + h.data_size].decode() UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 35: ordinal not in range(128)

the command line is : onkyo --discover for example but exaclty same result with usual command

the pip freeze is the following :

freebox@debian:~$ pip freeze asn1crypto==0.24.0 certifi==2018.8.24 chardet==3.0.4 configparser==3.5.0b2 cryptography==2.6.1 docopt==0.6.2 entrypoints==0.3 enum34==1.1.6 euca2ools===3.3-devel idna==2.6 ipaddress==1.0.17 keyring==17.1.1 keyrings.alt==3.1.1 lxml==4.3.2 netifaces==0.10.9 onkyo-eiscp==1.2.7 pycrypto==2.6.1 PyGObject==3.30.4 pyxdg==0.25 PyYAML==3.13 requestbuilder===devel requests==2.21.0 SecretStorage==2.3.1 six==1.12.0 urllib3==1.24.1

The hardware is an onkyo TX-NR696 with the latest firmware update

For the network capture how can i do it?