View Single Post
Old 08-23-2011, 07:44 PM   #109
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
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).
kiwidude is offline   Reply With Quote