lionheart / python-harvest

A Python wrapper for the Harvest time-tracking API.
Apache License 2.0
55 stars 49 forks source link

Small bug in harvest.py #1

Closed tjgmax closed 9 years ago

tjgmax commented 11 years ago

Hi. As far as I can tell, on line 52 of harvest.py, you want "r.json()", not "r.json". Newer versions of the requests module use a method rather than a property (cf. https://github.com/kennethreitz/requests/issues/1028).

olange commented 9 years ago

I encountered the same problem and also replaced:

try:
    return r.json

with

try:
    return r.json()

within harvest.py to be able to access the request results.