Fix Python3 encoding errors

Can't add bytes and str in Python3