WebexPythonSDK icon indicating copy to clipboard operation
WebexPythonSDK copied to clipboard

endless loop listing rooms

Open fredless opened this issue 5 years ago • 0 comments

spaces = api.rooms.list(sortBy='lastactivity')
for space in spaces:
    do_something(space)

While code like the above has previously worked without issue against my account, it now loops endlessly; repeating through spaces that are returned near the end to infinity. If I try to load the whole GeneratorContainer all at once - like

spaces = list(api.rooms.list(sortBy='lastactivity')

..it similarly just goes on "forever" (in reality, it usually eventually errors out with a 502 or 503 after a very long time).

Now if I leave out sortBy='lastactivity' - it works fine, iterating through my ~1000 spaces without issue. I noticed this start a month or two ago, just took me a while to get back to my code and look at the issue.

Anyone else seeing the same?

fredless avatar Dec 13 '20 05:12 fredless