-
Notifications
You must be signed in to change notification settings - Fork 18
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 in discover() #17
Comments
With a very simple program:
I too get an exception:
(not the same, but much easier to read) |
test.py is the 2nd example on the home page:
|
Fix in PR: for others, if that PR has not been merged, you may see here if you wish: |
I was unable to use this library on my network due to the following uncaught exception when calling the discover() method.
Python 3.10.2 (v3.10.2:a58ebcc701, Jan 13 2022, 14:50:16) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/3.10/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 "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/upnpy/ssdp/SSDPRequest.py", line 50, in m_search
devices = self._send_request(self._get_raw_request())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/upnpy/ssdp/SSDPRequest.py", line 100, in _send_request
device = SSDPDevice(addr, response.decode())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/upnpy/ssdp/SSDPDevice.py", line 83, in init
self._get_description_request(utils.parse_http_header(response, 'Location'))
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/upnpy/ssdp/SSDPDevice.py", line 117, in _get_description_request
device_description = utils.make_http_request(url).read()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/upnpy/utils.py", line 81, in make_http_request
return urllib.request.urlopen(request)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 519, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1377, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1352, in do_open
r = h.getresponse()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1374, in getresponse
response.begin()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 318, in begin
version, status, reason = self._read_status()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 279, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socket.py", line 705, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 54] Connection reset by peer
The text was updated successfully, but these errors were encountered: