You don't need to do this conversion. when `logging.error` applies the positional arguments it'll do that `str()` thing for you.