''.encode(errors=) is missing on 2.6

`''.encode()` does not have an errors keyword argument in 2.6. I've created a test case that demonstrates the issue and fixed the issue itself.