Closed GoogleCodeExporter closed 9 years ago
Please close this bug as invalid.
bozo and bozo_exception are used for developers to debug when something goes
wrong. Nothing went wrong in this specific case, so the information can be
ignored.
Original comment by kurtmckee
on 4 Dec 2010 at 4:18
Original comment by adewale
on 4 Dec 2010 at 11:04
Is there then no way to detect this case?
Original comment by chriscam...@googlemail.com
on 6 Dec 2010 at 10:27
@chris: Actually, there is! All of the feedparser-specific errors can be
detected based on their class:
if isinstance(result.bozo_exception, feedparser.CharacterEncodingOverride):
# do something here
pass
Or, if you want to ignore almost all of the feedparser-specific errors, they're
almost all a subclass of feedparser.ThingsNobodyCaresAboutButMe:
if not isinstance(result.bozo_exception,
feedparser.ThingsNobodyCaresAboutButMe):
# this is a bigger deal, like maybe a SAXParserException
pass
Again, this information is necessary to developers when something goes really
wrong because the server's HTTP headers don't agree with the XML declaration,
or because the XML declaration doesn't agree with the feed's byte order marks,
etc. In this specific case (ASCII vs ISO 8859-1), it's probably no big deal.
I hope that helps!
Original comment by kurtmckee
on 6 Dec 2010 at 5:31
Original issue reported on code.google.com by
chriscam...@googlemail.com
on 26 Sep 2010 at 11:02