Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
corrpel opened this issue Mar 4, 2018 · 2 comments
Open

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

corrpel opened this issue Mar 4, 2018 · 2 comments

Comments

@corrpel
Copy link

corrpel commented Mar 4, 2018

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

@laurivaltteri
Copy link

pip install --upgrade zeroconf==0.19.1

@j796160836
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants