jruusu / flickrsmartsync

Sync your photos to flickr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'int' object has no attribute 'startswith'

jruusu opened this issue · comments

Apparently, given a numeric (int) size label on a video, sync (download) fails with this error message:

Traceback (most recent call last):
  File "/home/users/user/bin/flickrsmartsync", line 11, in <module>
    sys.exit(main())
  File "/home/users/user/.local/lib/python2.7/site-packages/flickrsmartsync/__init__.py", line 77, in main
    sync.start_sync()
  File "/home/users/user/.local/lib/python2.7/site-packages/flickrsmartsync/sync.py", line 29, in start_sync
    self.download()
  File "/home/users/user/.local/lib/python2.7/site-packages/flickrsmartsync/sync.py", line 103, in download
    photos = self.remote.get_photos_in_set(photo_set, get_url=True)
  File "/home/users/user/.local/lib/python2.7/site-packages/flickrsmartsync/remote.py", line 126, in get_photos_in_set
    original = filter(lambda s: s['label'].startswith('Video Original') and s['media'] == 'video', sizes['sizes']['size'])
  File "/home/users/user/.local/lib/python2.7/site-packages/flickrsmartsync/remote.py", line 126, in <lambda>
    original = filter(lambda s: s['label'].startswith('Video Original') and s['media'] == 'video', sizes['sizes']['size'])
AttributeError: 'int' object has no attribute 'startswith'

Possibly related data:

{ "label": "700", "width": "", "height": "", ... , "media": "video" }