ains / aircast

AirPlay to Chromecast audio bridge
MIT License
120 stars 16 forks source link

TypeError: unsupported operand type(s) for &: 'str' and 'int' #7

Open corrpel opened 6 years ago

corrpel commented 6 years ago

Hi, I've installed everything needed but when i try to run it i receive the following: Do someone have any clue how to solve it? Thank you.

Searching for Chromecast devices... Exception in thread zeroconf-Engine: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in bootstrap_inner self.run() File "/usr/local/lib/python2.7/dist-packages/zeroconf-0.20.0-py2.7.egg/zeroconf.py", line 1133, in run reader.handleread(socket) File "/usr/local/lib/python2.7/dist-packages/zeroconf-0.20.0-py2.7.egg/zeroconf.py", line 1175, in handle_read msg = DNSIncoming(data) File "/usr/local/lib/python2.7/dist-packages/zeroconf-0.20.0-py2.7.egg/zeroconf.py", line 644, in init__ self.read_questions() File "/usr/local/lib/python2.7/dist-packages/zeroconf-0.20.0-py2.7.egg/zeroconf.py", line 667, in read_questions name = self.read_name() File "/usr/local/lib/python2.7/dist-packages/zeroconf-0.20.0-py2.7.egg/zeroconf.py", line 756, in read_name t = length & 0xC0 TypeError: unsupported operand type(s) for &: 'str' and 'int'

Traceback (most recent call last): File "main.py", line 21, in start_aircast(get_ip_address(args.iface), args.port) File "/home/kid/aircast/src/aircast.py", line 20, in start_aircast caster = Caster(stream_url) File "/home/kid/aircast/src/cast.py", line 16, in init raise RuntimeError("Unable to find a Chromecast on the local network.") RuntimeError: Unable to find a Chromecast on the local

laurivaltteri commented 6 years ago

pip install --upgrade zeroconf==0.19.1

j796160836 commented 6 years ago

Yeah laurivaltteri's answer works. Because the zeroconf changelog says it dropped support for Python 2 since 0.20.0.

screen shot 2018-05-23 at 12 20 27 pm

https://github.com/jstasiak/python-zeroconf#0200