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

multi-byte encodings are not supported #22

Open
SalSevenSix opened this issue Dec 11, 2023 · 0 comments
Open

multi-byte encodings are not supported #22

SalSevenSix opened this issue Dec 11, 2023 · 0 comments

Comments

@SalSevenSix
Copy link

SalSevenSix commented Dec 11, 2023

Hit this error upon discover() on a particular LAN

code

upnp = upnpy.UPnP()
devices = upnp.discover()
print(repr(devices))

error

Traceback (most recent call last):
  File "/home/bsalis/.config/JetBrains/PyCharmCE2023.3/scratches/scratch.py", line 11, in <module>
    main()
  File "/home/bsalis/.config/JetBrains/PyCharmCE2023.3/scratches/scratch.py", line 6, in main
    devices = upnp.discover()
  File "/home/bsalis/projects/serverjockey/venv/lib/python3.10/site-packages/upnpy/upnp/UPnP.py", line 33, in discover
    for device in self.ssdp.m_search(discover_delay=delay, st='upnp:rootdevice', **headers):
  File "/home/bsalis/projects/serverjockey/venv/lib/python3.10/site-packages/upnpy/ssdp/SSDPRequest.py", line 50, in m_search
    devices = self._send_request(self._get_raw_request())
  File "/home/bsalis/projects/serverjockey/venv/lib/python3.10/site-packages/upnpy/ssdp/SSDPRequest.py", line 100, in _send_request
    device = SSDPDevice(addr, response.decode())
  File "/home/bsalis/projects/serverjockey/venv/lib/python3.10/site-packages/upnpy/ssdp/SSDPDevice.py", line 84, in __init__
    self._get_friendly_name_request()
  File "/home/bsalis/projects/serverjockey/venv/lib/python3.10/site-packages/upnpy/ssdp/SSDPDevice.py", line 23, in wrapper
    return func(device, *args, **kwargs)
  File "/home/bsalis/projects/serverjockey/venv/lib/python3.10/site-packages/upnpy/ssdp/SSDPDevice.py", line 127, in _get_friendly_name_request
    root = minidom.parseString(self.description)
  File "/usr/lib/python3.10/xml/dom/minidom.py", line 2000, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib/python3.10/xml/dom/expatbuilder.py", line 925, in parseString
    return builder.parseString(string)
  File "/usr/lib/python3.10/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
ValueError: multi-byte encodings are not supported
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

1 participant