Hacker News new | ask | show | jobs
by BaryonBundle 4269 days ago
Can't get it to work, e.g., for `hn.top_stories()` I get:

    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "hackernews.py", line 23, in top_stories
        return r.json()
    TypeError: 'list' object is not callable
Tried in both python 2.7.3 and python 3.2.3

EDIT: You need a relatively new version of requests for this to work. The version packaged with Debian Wheezy is too old. Use pip.

1 comments

Thanks for the feedback!

Prior to version 1.0.0 response.json() was a property, and was not callable. That's probably what caused your error.

I'll add a minimum version to requirements.txt for the folks that install this package manually.