RealTimeWeb / reddit

Connect to the popular link-sharing website Reddit to download posts and comments.
MIT License
6 stars 6 forks source link

problem with __str__ ? #3

Closed pconrad closed 10 years ago

pconrad commented 10 years ago

See transcript:

>>> import reddit
>>> posts = reddit.get_posts("UCSantaBarbara")
>>> for p in postsL:
...
KeyboardInterrupt
>>> for p in posts:
...    print(p)
...
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "./reddit.py", line 325, in __str__
    return unicode(self).encode('utf-8')
NameError: global name 'unicode' is not defined
acbart commented 10 years ago

Python 3 unicode printing errors (or rather, abusing built-ins that no longer exist error!). Should be resolved now!