gphotospy icon indicating copy to clipboard operation
gphotospy copied to clipboard

Handle empty mediaItems in search_album.

Open JendaPlhak opened this issue 3 years ago • 1 comments

When I apply the media search_album function on one of my google photo albums, I get

  File "/home/asd/.local/lib/python3.8/site-packages/gphotospy/media.py", line 959, in search_album
    for media in curr_list:
TypeError: 'NoneType' object is not iterable

For some reason one of the media items responses is empty despite the fact that nextPageToken is not None and there is still at least one page left to be iterated. This fixes the problem.

JendaPlhak avatar Aug 01 '21 17:08 JendaPlhak

#19

SmartManoj avatar Aug 31 '21 09:08 SmartManoj