miracle2k / onkyo-eiscp

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

ImportError: No module named queue #64

Closed corus87 closed 7 years ago

corus87 commented 7 years ago

Hi, Im running the latest raspbian-lite on a rpi3. Any Ideas?

pi@raspberry:~ $ onkyo --discover
Traceback (most recent call last):
  File "/usr/local/bin/onkyo", line 11, in <module>
    load_entry_point('onkyo-eiscp==1.1', 'console_scripts', 'onkyo')()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 560, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2648, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2302, in load
    return self.resolve()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2308, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "build/bdist.linux-armv7l/egg/eiscp/__init__.py", line 6, in <module>
  File "build/bdist.linux-armv7l/egg/eiscp/core.py", line 5, in <module>
ImportError: No module named queue 

edit: It only happens with version 1.1 , 1.0 is still running.

mckern commented 7 years ago

The module name is Queue in Python 2.7, but queue in Python 3.x. When I change line 5 in eiscp/core.py to:

- import queue, threading
+ import Queue, threading

Then I get:

mckern@glipglop ~ $ onkyo --discover
Traceback (most recent call last):
  File "/usr/local/bin/onkyo", line 7, in <module>
    from eiscp.script import run
  File "/usr/local/lib/python2.7/site-packages/eiscp/__init__.py", line 6, in <module>
    from .core import eISCP
  File "/usr/local/lib/python2.7/site-packages/eiscp/core.py", line 9, in <module>
    from . import commands
  File "/usr/local/lib/python2.7/site-packages/eiscp/commands.py", line 2365, in <module>
    range(1, 40): (1, 40),
TypeError: unhashable type: 'list'
mckern@ glipglop ~ $

Was the recent 1.1 release half-baked on Python 2.7?

unixgeex commented 7 years ago

Hi, just upgraded to 1.1 and then ... KO Please help

root@thetop:~# onkyo
Traceback (most recent call last):
  File "/usr/local/bin/onkyo", line 9, in <module>
    load_entry_point('onkyo-eiscp==1.1', 'console_scripts', 'onkyo')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 356, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2476, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load
    ['__name__'])
  File "/usr/local/lib/python2.7/dist-packages/eiscp/__init__.py", line 6, in <module>
    from .core import eISCP
  File "/usr/local/lib/python2.7/dist-packages/eiscp/core.py", line 9, in <module>
    from . import commands
  File "/usr/local/lib/python2.7/dist-packages/eiscp/commands.py", line 2365, in <module>
    range(1, 40): (1, 40),
TypeError: unhashable type: 'list'
miracle2k commented 7 years ago

Should be fixed in the new 1.2 release. Sorry for that guys, I didn't really test the Python 3 pull request. Let me know if there are more problems.

mckern commented 7 years ago

Thanks for the reasonably quick followup!

unixgeex commented 7 years ago

Looks good! Thanks!