GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ServiceInfo port=None not handled · Issue #1049 · python-zeroconf/python-zeroconf

ServiceInfo port=None not handled #1049

New issue
Copy link
New issue
Copy link
Open
Open
ServiceInfo port=None not handled#1049
Copy link

Description

@natedogith1
natedogith1
opened on Jan 11, 2022
Issue body actions

You get an error when you try to register a ServiceInfo with the default port.

>>> zc.register_service(zeroconf.ServiceInfo("_test._tcp.local.", "test._test._tcp.local."))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\natedogith1\AppData\Local\Programs\Python\Python39\lib\site-packages\zeroconf\_core.py", line 574, in register_service
    run_coro_with_timeout(
  File "C:\Users\natedogith1\AppData\Local\Programs\Python\Python39\lib\site-packages\zeroconf\_utils\asyncio.py", line 97, in run_coro_with_timeout
    return asyncio.run_coroutine_threadsafe(aw, loop).result(
  File "C:\Users\natedogith1\AppData\Local\Programs\Python\Python39\lib\concurrent\futures\_base.py", line 440, in result
    return self.__get_result()
  File "C:\Users\natedogith1\AppData\Local\Programs\Python\Python39\lib\concurrent\futures\_base.py", line 389, in __get_result
    raise self._exception
  File "C:\Users\natedogith1\AppData\Local\Programs\Python\Python39\lib\site-packages\zeroconf\_utils\asyncio.py", line 82, in await_awaitable
    await task
  File "C:\Users\natedogith1\AppData\Local\Programs\Python\Python39\lib\site-packages\zeroconf\_core.py", line 638, in _async_broadcast_service
    self.async_send(self.generate_service_broadcast(info, ttl, broadcast_addresses))
  File "C:\Users\natedogith1\AppData\Local\Programs\Python\Python39\lib\site-packages\zeroconf\_core.py", line 889, in async_send
    log_debug = log.isEnabledFor(logging.DEBUG)
  File "C:\Users\natedogith1\AppData\Local\Programs\Python\Python39\lib\site-packages\zeroconf\_protocol\outgoing.py", line 398, in packets
    answers_written = self._write_answers_from_offset(answer_offset)
  File "C:\Users\natedogith1\AppData\Local\Programs\Python\Python39\lib\site-packages\zeroconf\_protocol\outgoing.py", line 334, in _write_answers_from_offset
    if not self._write_record(answer, time_):
  File "C:\Users\natedogith1\AppData\Local\Programs\Python\Python39\lib\site-packages\zeroconf\_protocol\outgoing.py", line 298, in _write_record
    record.write(self)
  File "C:\Users\natedogith1\AppData\Local\Programs\Python\Python39\lib\site-packages\zeroconf\_dns.py", line 429, in write
    out.write_short(self.port)
  File "C:\Users\natedogith1\AppData\Local\Programs\Python\Python39\lib\site-packages\zeroconf\_protocol\outgoing.py", line 201, in write_short
    self._pack(b'!H', 2, value)
  File "C:\Users\natedogith1\AppData\Local\Programs\Python\Python39\lib\site-packages\zeroconf\_protocol\outgoing.py", line 184, in _pack
    self.data.append(struct.pack(format_, value))
struct.error: required argument is not an integer

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.