Would you please change `basestring` to `str`. The `basestring` is no longer available in Python 3, and it was removed. Use str instead.