There was an error when using .encode(). I'm trying to reproduce it now