charliewolf / pynder

:fire: Python client for tinder api
Other
638 stars 142 forks source link

str(User) infinite recursion on Python 3 #199

Open louisabraham opened 6 years ago

louisabraham commented 6 years ago

The problem is there: https://github.com/charliewolf/pynder/blob/master/pynder/models/user.py#L95

    def __str__(self):
        return six.text_type(self).encode('utf-8')

six.text_type is str in Python 3 hence an infinite loop. The best would be to use future.utils.python_2_unicode_compatible.