The base64 module appears to only throw TypeError and ValueError should also be possible.