catch TypeError: decoding unicode is not supported