ains/aircast

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

Opened this issue · 2 comments

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.handle_read(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

pip install --upgrade zeroconf==0.19.1

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