basestring isn't Python 3 compatible. Please use `six.text_type` instead.