fix py3 functionality

On py3 the import name needs to stay a native string. Also, there is no `six. text_types`, it was probably `six.text_type`.