Shouldn't this be `.decode()` rather than `.encode()`?