faisalraja / flickrsmartsync

Sync your photos to flickr
121 stars 48 forks source link

need to truncate long set description before passing to makedirs #49

Closed dwlf closed 6 years ago

dwlf commented 9 years ago

My scenario is attempting to use flickrsmartsync to export all photos from my spouse's flickr account.

Traceback (most recent call last):
  File "/usr/local/bin/flickrsmartsync", line 9, in <module>
    load_entry_point('flickrsmartsync==0.2.01', 'console_scripts', 'flickrsmartsync')()
  File "/usr/local/lib/python2.7/dist-packages/flickrsmartsync-0.2.01-py2.7.egg/flickrsmartsync/__init__.py", line 73, in main
    sync.start_sync()
  File "/usr/local/lib/python2.7/dist-packages/flickrsmartsync-0.2.01-py2.7.egg/flickrsmartsync/sync.py", line 27, in start_sync
    self.download()
  File "/usr/local/lib/python2.7/dist-packages/flickrsmartsync-0.2.01-py2.7.egg/flickrsmartsync/sync.py", line 89, in download
    self.remote.download(photos[photo], path)
  File "/usr/local/lib/python2.7/dist-packages/flickrsmartsync-0.2.01-py2.7.egg/flickrsmartsync/remote.py", line 203, in download
    os.makedirs(folder)   
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 36] File name too long: '/root/flickrsmartsync/We had two parties for William, one with extended family at Easter, and this one with friends. This one was originally scheduled for April 4th, but postponed to April 18th (actual birthday Aprtil 7th), due to William coming down with the stomach flu before the first one. Everyone was very gracious and still came to his party and we got a lovely surprise from out of town guests who made a day trip down! William sure has many people who love him. As you will see friends of all ages came to celebrate! THANK YOU EVERYONE!'

In my case, my workaround will likely to use set title instead of description.