Nope... lol
It's like playing whack-a-mole. Adding .encode('ascii', 'ignore') will prevent the error from happening when supplied a name like "Nieznany wyjątek", and allow QUrl.fromEncoded to not blow up.
However, it destroys the effect of .encode('latin-1') or similar that I need to do to cater for titles like "De l'inconvénient d'être né", which becomes something like: "De l'inconvnient d'tre n".
Which means I have to avoid converting to ascii. Which means I can't use QUrl.fromEncoded(). Which means I can't construct a QUrl, to give to open_url(). Argggghhhhhhhhh....
(And by the way your patience is clearly better than mine - my lack of Python knowledge slays me at times).
|