When do_upload() in flickrapi fails, it raises FlickrError exception and upload_photo() should retry. The retries indeed happen, however the first retry operation fails with Error: 4: Filesize was zero which I think happens because the file offset in the file position was advanced to the end of the file for the first upload attempt as the file was likely read whole. This change should fix that by reopening the file for each try.
When
do_upload()
inflickrapi
fails, it raisesFlickrError
exception andupload_photo()
should retry. The retries indeed happen, however the first retry operation fails withError: 4: Filesize was zero
which I think happens because the file offset in the file position was advanced to the end of the file for the first upload attempt as the file was likely read whole. This change should fix that by reopening the file for each try.