How about using six.text_type() here instead of ''?