flickr-download icon indicating copy to clipboard operation
flickr-download copied to clipboard

No such file

Open pmow opened this issue 6 years ago • 8 comments

When downloading all my photos, flickr-download saves Title.jpg.jpg and then proceeds to complain it can't find Title.jpg. I did a terrible thing and worked around this in the code, but I thought I'd mention it in case it was an issue going forward.

Traceback (most recent call last): File "/home/pmow/.local/bin/flickr_download", line 11, in <module> sys.exit(main()) File "/home/pmow/.local/lib/python2.7/site-packages/flickr_download/flick_download.py", line 357, in main args.skip_download) File "/home/pmow/.local/lib/python2.7/site-packages/flickr_download/flick_download.py", line 237, in download_user download_set(photoset.id, get_filename, size_label, skip_download) File "/home/pmow/.local/lib/python2.7/site-packages/flickr_download/flick_download.py", line 100, in download_set download_list(pset, pset.title, get_filename, size_label, skip_download) File "/home/pmow/.local/lib/python2.7/site-packages/flickr_download/flick_download.py", line 137, in download_list do_download_photo(dirname, pset, photo, size_label, suffix, get_filename, skip_download) File "/home/pmow/.local/lib/python2.7/site-packages/flickr_download/flick_download.py", line 207, in do_download_photo os.utime(fname, (taken_unix, taken_unix))

The final line is: OSError: [Errno 2] No such file or directory: '2018-01-01 Album Name Here/DSCF2545.jpg'

Tonight it looks like Yahoo is having server issues so I'm getting some HTML back after 10-15 photos. My ghetto "fix" is at least downloading the photos. I commented out:

fname = fname + suffix

I also concatenated the os.utime call to include the suffix to balance. I don't know python, or the flickrapi library.

pmow avatar Nov 26 '18 01:11 pmow

Did you see the error again? If not, I'll probably file this as a one time error with the Flickr service / APIs

beaufour avatar Dec 23 '18 15:12 beaufour

I'm seeing this error too. Same message and double-suffix behavior. I think it's due to the fact I installed a newer version of flickr_api than specified, which wants a filename without extension when calling photo.save, like here: https://github.com/beaufour/flickr-download/blob/b3667124d9c192afc4b990411c3ab18ab57a580f/flickr_download/flick_download.py#L199. See this diff in python-flickr-api. Will try and install older version of flickr_api.

jessjaco avatar Dec 25 '18 17:12 jessjaco

@blindjesse did you get a chance to try out an older version of the flicr_api by any chance?

beaufour avatar Feb 20 '19 01:02 beaufour

Yes, it worked with version 0.5.

jessjaco avatar Feb 20 '19 01:02 jessjaco

Ok. That's helpful. I'll try to upgrade the API at some point and fix what's needed then. Thanks!

beaufour avatar Feb 20 '19 02:02 beaufour

I added a fix for this issue on the flickr_api project, could you verify if it fixes the problem? I still didn't release a new version so you'll need to point your dependency to master branch.

mtrovo avatar Feb 21 '19 15:02 mtrovo

Oh, very nice @mtrovo! I didn't realized you were all over the flickr_api project too :) I will try to test the master branch. Thanks!

beaufour avatar Feb 21 '19 16:02 beaufour

I completely forgot all about this, sorry. As noted, there's a bug in the fix in flickr_api, but if I fix that locally it works.

beaufour avatar May 29 '19 21:05 beaufour

we are now using the newest flickr api, so this should be good.

beaufour avatar Sep 21 '22 14:09 beaufour