amoldabade7 / pybing

Automatically exported from code.google.com/p/pybing
Other
0 stars 0 forks source link

count is None in BingResultSet.__iter__ #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Program crashes running

query = WebQuery('<key>', query="coffee")
    results = query.execute()
    print len(results)
    for r in results:
        print repr(r.description)

Traceback (most recent call last):
  File "bingsearch.py", line 10, in <module>
    for r in results:
  File "/Users/[me]/.pylibs/pybing-0.1dev_r34-py2.6.egg/pybing/resultset.py", line 120, in __iter__
    query = query.set_offset(query.offset + query.count)

I'm nearly positive the problem is that line 107:

query.set_count(constants.MAX_PAGE_SIZE)

should instead read

query = query.set_count(constants.MAX_PAGE_SIZE)

Bitten by your funny immutable setter!

Original issue reported on code.google.com by karlpich...@gmail.com on 14 Apr 2011 at 7:27

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r35.

Original comment by jgeewax on 8 Nov 2011 at 2:33