You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import upnpclient as upnp
devices = upnp.discover()
I get these errors regarding my Marantz SR5008:
Error 'xmlns:ms: ' urn:microsoft-com:wmc-1-0' is not a valid URI, line 4, column 40 (<string>, line 4)' for http://192.168.1.xxx:8080/description.xml
Error 'xmlns:ms: ' urn:microsoft-com:wmc-1-0' is not a valid URI, line 4, column 40 (<string>, line 4)' for http://192.168.1.xxx:8080/description.xml
Error 'xmlns:ms: ' urn:microsoft-com:wmc-1-0' is not a valid URI, line 4, column 40 (<string>, line 4)' for http://192.168.1.xxx:8080/description.xml
Error 'xmlns:ms: ' urn:microsoft-com:wmc-1-0' is not a valid URI, line 4, column 40 (<string>, line 4)' for http://192.168.1.xxx:8080/description.xml
Error 'xmlns:ms: ' urn:microsoft-com:wmc-1-0' is not a valid URI, line 4, column 40 (<string>, line 4)' for http://192.168.1.xxx:8080/description.xml
Error 'xmlns:ms: ' urn:microsoft-com:wmc-1-0' is not a valid URI, line 4, column 40 (<string>, line 4)' for http://192.168.1.xxx:8080/description.xml
If I then run devices, I do get a list summing up some devices I have on my network but the Marantz is not in there, probably because of those errors mentioned above....
I believe this is a common issue with some AV receiver. I had the same one with my Denon.
Maybe they are all using the same buggy UPnP stack.
A possible solution is to do the XML parsing in recovery mode if a problem like this is encountered, then it will still parse the file, even if the URI is malformed. The only downside is that this can (not must!) lead to undefined behavior later on. A flag that is set if an XML parsing error occurred could inform the programmer that undefined behavior can happen with this device. Maybe a bit wacky, but this is still way better than never interacting with the device in the first place.
I can do a PR for that in the next few days or even today if I find the time.
When I run:
I get these errors regarding my Marantz SR5008:
If I then run devices, I do get a list summing up some devices I have on my network but the Marantz is not in there, probably because of those errors mentioned above....
If I look at http://192.168.1.xxx:8080/description.xml I get the following XML:
Note that I replaced IP with xxx and some unimportant info with ?
I am pretty sure the problem is the space " " in the urn in line 4:
xmlns:ms=" urn:microsoft-com:wmc-1-0"
Does anyone have an idea how to fix this?
The text was updated successfully, but these errors were encountered: