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

cast_control connect v0.11.8.post0 throws error from zeroconf #15

Open
afeder opened this issue Oct 23, 2021 · 2 comments
Open

cast_control connect v0.11.8.post0 throws error from zeroconf #15

afeder opened this issue Oct 23, 2021 · 2 comments

Comments

@afeder
Copy link

afeder commented Oct 23, 2021

I get the following error upon launching cast_control:

afeder@voyager:~$ cast_control -V
cast_control v0.11.8.post0
afeder@voyager:~$ cast_control connect -u 5b6ca94f-332a-4e8d-895f-3b3a94c55d0d
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/home/afeder/.local/lib/python3.9/site-packages/pychromecast/socket_client.py", line 513, in run
    self.initialize_connection()
  File "/home/afeder/.local/lib/python3.9/site-packages/pychromecast/socket_client.py", line 296, in initialize_connection
    host, port, service_info = get_host_from_service(
  File "/home/afeder/.local/lib/python3.9/site-packages/pychromecast/dial.py", line 32, in get_host_from_service
    service_info = zconf.get_service_info("_googlecast._tcp.local.", service.data)
  File "/home/afeder/.local/lib/python3.9/site-packages/zeroconf/_core.py", line 523, in get_service_info
    if info.request(self, timeout, question_type):
  File "/home/afeder/.local/lib/python3.9/site-packages/zeroconf/_services/info.py", line 455, in request
    assert zc.loop is not None and zc.loop.is_running()
AssertionError

Using pychromecast, I can connect and interact with the Chromecast device directly in Python interactive mode with no issues.

Any idea what could be causing this?

@afeder
Copy link
Author

afeder commented Oct 25, 2021

I googled around and found that the CATT project had a similar issue with zeroconf>0.31.0. They resolved it by pinning their dependency to zeroconf==0.31.0 for the time being. I tried installing zeroconf==0.31.0 on my machine and it resolved my issue with cast_control too.

I thus no longer have any problems, but you may or may not want to pin the dependency in cast_control too. I'll leave it to you to decide whether to close the issue.

@alexdelorenzo
Copy link
Owner

Hey @afeder, thanks for opening an issue and including logs. I'm glad you were able to solve your issue, thanks for the heads up about zeroconf.

I'm going to leave this issue open until I make a release that addresses it.

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

2 participants