sunlightlabs / python-sunlight

Unified Python bindings for Sunlight APIs
http://sunlightfoundation.com/api/
Other
66 stars 22 forks source link

specifying a pagination limit larger than the actual returned set size throws an error #18

Closed sbma44 closed 9 years ago

sbma44 commented 10 years ago

print list(congress.legislators(chamber='senate', fields='bioguide_id', limit=100))

a dict full of lots of bioguides...

but

print list(congress.legislators(chamber='senate', fields='bioguide_id', limit=101))

Traceback (most recent call last): File "scorecard.py", line 22, in main() File "scorecard.py", line 10, in main senators = [s.get('bioguide_id') for s in congress.legislators(chamber='senate', fields='bioguide_id', limit=200)] File "/Users/tomlee/.virtualenvs/eff_scorecard/lib/python2.7/site-packages/sunlight/pagination.py", line 76, in pagingfunc for rec in resp: TypeError: 'NoneType' object is not iterable

dcloud commented 9 years ago

PagingService is fixed.