Handling LookupError on codecs decode