Skip to content

Async and sync browser examples fail when there are services with > 15 chars #661

@bdraco

Description

@bdraco
# python3 async_browser.py  --find
DEBUG:asyncio:Using selector: EpollSelector
DEBUG:asyncio:Using selector: EpollSelector
DEBUG:asyncio:Using selector: EpollSelector

Browsing ['_adisk._tcp.local.', '_afpovertcp._tcp.local.', '_airplay._tcp.local.', '_apple-mobdev2._tcp.local.', '_axis-video._tcp.local.', '_companion-link._tcp.local.', '_device-info._tcp.local.', '_esphomelib._tcp.local.', '_hap._tcp.local.', '_heos-audio._tcp.local.', '_home-assistant._tcp.local.', '_home-sharing._tcp.local.', '_homekit._tcp.local.', '_http-alt._tcp.local.', '_http._tcp.local.', '_hue._tcp.local.', '_ipp._tcp.local.', '_ipps._tcp.local.', '_lap._tcp.local.', '_leap._tcp.local.', '_lutron._tcp.local.', '_mediaremotetv._tcp.local.', '_meshcop._udp.local.', '_nut._tcp.local.', '_pdl-datastream._tcp.local.', '_powerview._tcp.local.', '_printer._tcp.local.', '_privet._tcp.local.', '_psia._tcp.local.', '_raop._tcp.local.', '_scanner._tcp.local.', '_sftp-ssh._tcp.local.', '_sleep-proxy._udp.local.', '_sonos._tcp.local.', '_spotify-connect._tcp.local.', '_ssh._tcp.local.', '_tivo-device._tcp.local.', '_tivo-mindrpc._tcp.local.', '_tivo-remote._tcp.local.', '_tivo-videos._tcp.local.', '_tivo-videostream._tcp.local.', '_tivo-xcode._tcp.local.', '_uscan._tcp.local.', '_uscans._tcp.local.', '_workstation._tcp.local.'] service(s), press Ctrl-C to exit...

Traceback (most recent call last):
  File "async_browser.py", line 73, in <module>
    aiobrowser = AsyncServiceBrowser(aiozc, services, handlers=[async_on_service_state_change])
  File "/root/python-zeroconf/zeroconf/aio.py", line 137, in __init__
    super().__init__(aiozc.zeroconf, type_, handlers, listener, addr, port, delay)  # type: ignore
  File "/root/python-zeroconf/zeroconf/_services/__init__.py", line 171, in __init__
    if not check_type_.endswith(service_type_name(check_type_, strict=False)):
  File "/root/python-zeroconf/zeroconf/_utils/name.py", line 108, in service_type_name
    raise BadTypeInNameException("Service name (%s) must be <= 15 bytes" % test_service_name)
zeroconf._exceptions.BadTypeInNameException: Service name (tivo-videostream) must be <= 15 bytes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions