-
Notifications
You must be signed in to change notification settings - Fork 162
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
Fix for Pioneer sc-lx76 #182
Conversation
Thanks for that. I will modify it a little bit to make this more generic |
Well there is a real problem with that, so I had to remove your changes from master. # -*- coding: utf-8 -*-
from __future__ import unicode_literals
test = b'''<?xml version='1.0' encoding='utf-8'?>
<root configId="1" xmlns:ms=" urn:microsoft-com">
<specVersion>
<major>1</major>
<minor>1</minor>
</specVersion>
<device>
<manufacturer>Бланк</manufacturer>
</device>
</root>'''
test2 = test.replace(
'xmlns:ms=" urn:microsoft-com', 'xmlns:ms="urn:microsoft-com')
print(type(test))
print(type(test2))
print(test2) Since we are using the unicode_literals module replace cannot work with bytes beyond ascii. So your commit breaks the xml parsing for every xml which contains non ascii chars. |
Solved. Could you please verify that my fix is working for you? |
I'm trying to use your library together with a Pioneer VSX924 receiver, but see this exception in the log:
This seems like a problem that should have been fixed by this pull request if I understood it correctly. UPDATE: fixed the problem for me, by switching to https://aur.archlinux.org/packages/pulseaudio-dlna-cygn = https://github.com/Cygn/pulseaudio-dlna (from https://aur.archlinux.org/packages/pulseaudio-dlna = https://github.com/masmu/pulseaudio-dlna ) |
Pioneer sc-lx76 (possibly others) gives unvalid description.xml. There is a space before urn. Replacing it to valid namespace fixes this and after this oneliner pulseaudio-dlna works.