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

Uncaught exception for discover() #20

Open
gabrielwong1991 opened this issue Oct 20, 2022 · 0 comments
Open

Uncaught exception for discover() #20

gabrielwong1991 opened this issue Oct 20, 2022 · 0 comments

Comments

@gabrielwong1991
Copy link

gabrielwong1991 commented Oct 20, 2022

Hi I too have an exception while connecting to the Vodafone UK router, the router is UPnP enabled and program works fine for other routers. Here is the exception Remote end closed connection without response

>>> import upnpy
>>> u = upnpy.UPnP()
>>> u.discover()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/dist-packages/upnpy/upnp/UPnP.py", line 33, in discover
    for device in self.ssdp.m_search(discover_delay=delay, st='upnp:rootdevice', **headers):
  File "/usr/local/lib/python3.9/dist-packages/upnpy/ssdp/SSDPRequest.py", line 50, in m_search
    devices = self._send_request(self._get_raw_request())
  File "/usr/local/lib/python3.9/dist-packages/upnpy/ssdp/SSDPRequest.py", line 100, in _send_request
    device = SSDPDevice(addr, response.decode())
  File "/usr/local/lib/python3.9/dist-packages/upnpy/ssdp/SSDPDevice.py", line 87, in __init__
    self._get_services_request()
  File "/usr/local/lib/python3.9/dist-packages/upnpy/ssdp/SSDPDevice.py", line 23, in wrapper
    return func(device, *args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/upnpy/ssdp/SSDPDevice.py", line 54, in wrapper
    return func(instance, *args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/upnpy/ssdp/SSDPDevice.py", line 176, in _get_services_request
    device_services[parsed_service_id] = self.Service(
  File "/usr/local/lib/python3.9/dist-packages/upnpy/ssdp/SSDPDevice.py", line 269, in __init__
    self._get_description_request()
  File "/usr/local/lib/python3.9/dist-packages/upnpy/ssdp/SSDPDevice.py", line 301, in _get_description_request
    service_description = utils.make_http_request(self.scpd_url).read()
  File "/usr/local/lib/python3.9/dist-packages/upnpy/utils.py", line 81, in make_http_request
    return urllib.request.urlopen(request)
  File "/usr/lib/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.9/urllib/request.py", line 517, in open
    response = self._open(req, data)
  File "/usr/lib/python3.9/urllib/request.py", line 534, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 1375, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib/python3.9/urllib/request.py", line 1350, in do_open
    r = h.getresponse()
  File "/usr/lib/python3.9/http/client.py", line 1347, in getresponse
    response.begin()
  File "/usr/lib/python3.9/http/client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.9/http/client.py", line 276, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

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