Codec lookup fails for bad codec name, blowing up BeautifulSoup

I just had our web page parser fail on "www.nasa.gov".
It seems that NASA returns an HTTP header with a charset of ".utf8", which
is non-standard. This goes into BeautifulSoup, which blows up trying to
find a suitable codec.

Advertisements

Waldemar Osuch wrote:
>> This is a known bug. It's in the old tracker on SourceForge:
>> [ python-Bugs-960874 ] codecs.lookup can raise exceptions other
>> than LookupError
>> but not in the new tracker.
>
> The new tracker has it too.
> http://bugs.python.org/issue960874

How did you find that? I put "codecs.lookup" into the tracker's
search box, and it returned five hits, but not that one.

On Nov 9, 4:15 pm, John Nagle <> wrote:
> Waldemar Osuch wrote:
> >> This is a known bug. It's in the old tracker on SourceForge:
> >> [ python-Bugs-960874 ] codecs.lookup can raise exceptions other
> >> than LookupError
> >> but not in the new tracker.
>
> > The new tracker has it too.
> >http://bugs.python.org/issue960874
>
> How did you find that? I put "codecs.lookup" into the tracker's
> search box, and it returned five hits, but not that one.
>
> John Nagle

I have seen this explained on this list once:http://bugs.python.org/issues + <source forge bug id>
points to the converted ticket.
And yes the search could be better.

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!