I&#x27;ve really tried to figure out how to use these methods properly, but in the end, the only successful strategy I&#x27;ve found essentially boils down to randomly sprinkling encodes and decodes throughout my code until errors stop happening. Half the time I end up using an encode where my interpretation of the documentation suggested a decode would be required, or vice versa. (This is in Python 2. I haven&#x27;t tried Python 3 yet since I don&#x27;t do much Python coding these days.)