python 2.6, encode has no kwargs... missed these somehow