Coder Social home page Coder Social logo

folders2flickr's Introduction

Build Status

This is a fork of the seemingly defunct http://code.google.com/p/folders2flickr/ project.

When looking for a good way to upload photos and videos to flickr from the command line, I found the following free software options:

  • flickrfs - doesn't support video, freezes all the time
  • imguploadr - has too many dependencies and after fixing the Solaris-based Makefile it still didn't work
  • flickr_upload - doesn't support sets, is in "write-only" Perl
  • uploadr - really basic, hardcoded paths and just too untested

After diving into each, folders2flickr seemed the best. It is based on uploadr, but fixes the problems I had. However it still had some bugs:

  • sets didn't quite work
  • slow, as it did pointless things multiple times

Fortunately it is written in Python and the code wasn't too bad. I've cleaned it up and it runs great on GNU/Linux - specifically tested on Ubuntu 12.04.

To fix the slow initial run, it will upload all photos and videos it doesn't know about. So keep the database it creates in a safe place!

INSTALLATION

The easiest way is to use pip.

pip install --user git+https://github.com/richq/folders2flickr.git

This will create ~/.local/bin/folders2flickr and install the library to the right place in .local. The sample configuration file can be created like this:

cp ~/.local/share/folders2flickr/uploadr.ini.sample ~/.uploadr.ini
sensible-editor ~/.uploadr.ini
# modify 'imagedir', etc.

If you want to use a local clone of the repository then please be aware that folders2flickr depends on the python-exif package. Once you have installed that package, create a clone of folders2flickr using git:

git clone https://github.com/richq/folders2flickr.git

Then you will need to configure the directories to use:

cp uploadr.ini.sample uploadr.ini
sensible-editor uploadr.ini
# modify at least 'imagedir' to point to the location of new images

I try to keep the master branch usable, but there are point releases if you prefer a stable fixed version. To install a release, download the zip file, unpack it and away you go. The python-exif dependency will be included in these zips.

WHAT IS UPLOADED

The photos and videos in the directory given in the uploadr.ini file are eventually uploaded to flickr and placed into sets. Only files with the extensions jpg, gif, png, avi and mov are uploaded, and flickr may reject them if they are not in the correct format.

If you add the file .f2fignore to a directory then it can be used to ignore files and subdirectories. Ignored files will not be uploaded, and the script will not descend into ignored subdirectories. The ignore pattern is cumulative over the directory tree, so you can specify a general pattern at a top level directory and it will apply to sub-directories too.

The contents of the .f2fignore file is a series of glob patterns, one pattern or filename per line. Subdirectories are also ignored if they match the pattern. For example, to ignore the file MVI_3847.AVI you can either specify the file exactly:

MVI_3847.AVI

or you could add a pattern to the ignore file:

MVI_*.AVI

The pattern is case sensitive and uses Python's fnmatch.

RUNTIME DATA FILES

Two files are created during execution:

  • .flickrToken, which has the token to authenticate to flickr
  • the history file, which contains the photos uploaded so far

By default both of these are created in the current working directory, so next time you run folders2flickr you should do so from the same place.

folders2flickr's People

Contributors

alitaker avatar japanuspus avatar juhai avatar julienv avatar placidorevilla avatar richq avatar therealdealneil avatar thomascobb avatar tzdyrski avatar walles avatar waywit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

folders2flickr's Issues

KeyError and IndexError

I just pulled the latest version (the f2fignore branch, actually) and ran folders2flickr. I did not run it for a few weeks. During indexing it came up with a whole bunch of KeyError and IndexError exceptions. An excerpt from the error.log:

(<type 'exceptions.KeyError'>, KeyError('MakerNote Tag 0x0004',), <traceback object at 0x2e81560>)
(<type 'exceptions.IndexError'>, IndexError('list index out of range',), <traceback object at 0x2f51320>)
(<type 'exceptions.IndexError'>, IndexError('list index out of range',), <traceback object at 0x2f51878>)
(<type 'exceptions.KeyError'>, KeyError('MakerNote Tag 0x0004',), <traceback object at 0x2e81710>)
(<type 'exceptions.KeyError'>, KeyError('MakerNote Tag 0x0004',), <traceback object at 0x2f4e488>)
(<type 'exceptions.KeyError'>, KeyError('MakerNote Tag 0x0004',), <traceback object at 0x2f4e6c8>)
(<type 'exceptions.KeyError'>, KeyError('MakerNote Tag 0x0004',), <traceback object at 0x2f4e5f0>)
(<type 'exceptions.KeyError'>, KeyError('MakerNote Tag 0x0004',), <traceback object at 0x2f4e440>)
(<type 'exceptions.KeyError'>, KeyError('MakerNote Tag 0x0004',), <traceback object at 0x2f4ea28>)
(<type 'exceptions.KeyError'>, KeyError('MakerNote Tag 0x0004',), <traceback object at 0x2f4e680>)
(<type 'exceptions.KeyError'>, KeyError('MakerNote Tag 0x0004',), <traceback object at 0x2f4e290>)
(<type 'exceptions.KeyError'>, KeyError('MakerNote Tag 0x0004',), <traceback object at 0x2f4e488>)
(<type 'exceptions.IndexError'>, IndexError('list index out of range',), <traceback object at 0x2e80ab8>)
(<type 'exceptions.IndexError'>, IndexError('string index out of range',), <traceback object at 0x2f511b8>)
(<type 'exceptions.IndexError'>, IndexError('string index out of range',), <traceback object at 0x2e80878>)
(<type 'exceptions.IndexError'>, IndexError('list index out of range',), <traceback object at 0x2e80f38>)
(<type 'exceptions.KeyError'>, KeyError('MakerNote Tag 0x0004',), <traceback object at 0x2f4ebd8>)
(<type 'exceptions.KeyError'>, KeyError('MakerNote Tag 0x0004',), <traceback object at 0x2f4eb00>)

And an excerpt from debug.log:

2014-03-18 18:07:36,336 ERROR (<type 'exceptions.KeyError'>, KeyError('MakerNote Tag 0x0001',), <traceback object at 0x2e7ab90>)
2014-03-18 18:07:36,337 DEBUG Getting EXIF for /storage/Photos/2009/Huis verkopen/Selectie/Woonkamer/IMG_2965.JPG
2014-03-18 18:07:36,376 ERROR (<type 'exceptions.KeyError'>, KeyError('MakerNote Tag 0x0001',), <traceback object at 0x2e817a0>)
2014-03-18 18:07:36,377 DEBUG Getting EXIF for /storage/Photos/2009/Huis verkopen/Selectie/Woonkamer/IMG_2969.JPG
2014-03-18 18:07:36,406 ERROR (<type 'exceptions.KeyError'>, KeyError('MakerNote Tag 0x0001',), <traceback object at 0x2e816c8>)
2014-03-18 18:07:36,428 DEBUG Getting EXIF for /storage/Photos/2010/2. Wereldreis/10. Thailand [Mei-Augustus]/3. Koh Tao/10. Dag 12 - foto's motorfiets/P6120111.JPG
2014-03-18 18:07:36,562 ERROR (<type 'exceptions.IndexError'>, IndexError('list index out of range',), <traceback object at 0x2e816c8>)
2014-03-18 18:07:36,564 DEBUG Getting EXIF for /storage/Photos/2010/2. Wereldreis/10. Thailand [Mei-Augustus]/3. Koh Tao/12. snorkel test Avery/P6190111.JPG
2014-03-18 18:07:36,793 ERROR (<type 'exceptions.IndexError'>, IndexError('string index out of range',), <traceback object at 0x2f516c8>)
2014-03-18 18:10:16,761 Uploading image /storage/Photos/2011/4. April/1. Vrijgezellenfeest S&A/Karin/P4030094_10.avi with tags #/2011/4.#April/1.#Vrijgezellenfeest#S&A/Karin/P4030094_10.avi "" "2011" "4. April" "1. Vrijgezellenfeest S&A" "Karin"
2014-03-18 18:10:21,966 (<type 'exceptions.IndexError'>, IndexError('list index out of range',), <traceback object at 0x2f256c8>)
2014-03-18 18:10:22,111 (<type 'exceptions.IndexError'>, IndexError('list index out of range',), <traceback object at 0x2f23908>)

The script is actually uploading photos, but it does generate a lot of these errors in the mean time.
Any idea what may be going on?

altaroca fork: No set created

Hi,
I use the altaroca fork and it works quite well. Great job and OAuth authentication, upload of pictures and movies works.
But no set is created, it don't use folder name to create the set. I don't know why.
Thanks for your help.

My uploadr.ini is:
``

`#` Location to scan for new images (no trailing \)
#
# Example: imagedir = d:\pictures
imagedir = /mnt/nas8/_Photos

#
# File we keep the history of uploaded images in.
#
history_file = history

#visible 1, invisible 0
public = 0
friend = 0
family = 0

# Keep in the global search result:
# hidden = 1
# Hide from public searches (if not set, this is the default):
hidden = 2

# set this to true if name of the auto generated flickr sets should be only name of the last sub folder 
# e.g. Crete when folder is d:\testpictures\holidays\Crete\123img.jpg
only_sub_sets  = false

# set full_folder_tags to true if you wish to override the original (default) parsing 
# of folder tags and instead treat each sub-folder name as a complete tag.
# Example: 
# /path to/my picture/
# false (Default), tags are parsed: "path" "to" "my" "picture"
# true, tags are parsed: "path to" "my picture"
full_folder_tags = true

#
# Override Flickr Dates. Let Flickr figure out dates, or override them after image upload
# date_taken is usually taken from EXIF
# date_posted is usually the UNIX timestamp of the upload datetime
# override_dates: 0=NO (default), 1=YES
# date_taken_type: 0: default (let Flickr choose), 1 use EXIF date, 2 fixed date
# date_posted_type: 0: default (let Flickr choose), 1 use EXIF date, 2 fixed date
# date_taken_fixed:  mysql format date e.g. 2010-01-31 13:04:05
# date_posted_fixed: UNIX timestamp e.g. 14960583869
# date_taken_granularity: 0=Y-m-d H:i:s (default), 4=Y-m, 6=Y, 8=Circa
# date_posted_granularity: 0=Y-m-d H:i:s (default), 4=Y-m-31 23:59:59, 6=Y-12-31 23:59:59
# date_posted_utc: GMT zone (Flickr defaults to UTC). Number of hours to be subtracted for obtaining an UTC timestamp from EXIF or fixed date_posted, e.g. +1 or 1 or -6
override_dates = 0

#
# Key and Hash codes. Use those established by the original folders2flicker author (default below)
# or alternately request your own from Flickr.
api_key=...
secret=...

`

Sets not being created

It appears the sets aren't being created at all. I cleared all images and sets from my flickr account using their website, then I took a folder on my desktop as the image directory and started the script. It uploaded most of the files ok but it failed to create any of the folders as sets.

Here is my config file:

[DEFAULT]
#
# Location to scan for new images (no trailing \)
#
# Example: imagedir = d:\pictures
imagedir = /Users/chris/Desktop/Kiva Stuff

#
# File we keep the history of uploaded images in.
#
history_file = history

#visible 1, invisible 0
public = 0
friend = 0
family = 0

# Keep in the global search result:
# hidden = 1
# Hide from public searches (if not set, this is the default):
hidden = 2

# set this to true if name of the auto generated flickr sets should be only name of the last sub folder
# e.g. Crete when folder is d:\testpictures\holidays\Crete\123img.jpg
only_sub_sets  = false

# set full_folder_tags to true if you wish to override the original (default) parsing
# of folder tags and instead treat each sub-folder name as a complete tag.
# Example:
# /path to/my picture/
# false (Default), tags are parsed: "path" "to" "my" "picture"
# true, tags are parsed: "path to" "my picture"
full_folder_tags = true

#
# Key and Hash codes. Use those established by the original folders2flicker author (default below)
# or alternately request your own from Flickr.
#
# secret = 13c314caee8b1f31
# api_key = 91dfde3ed605f6b8b9d9c38886547dcf

Here is error output:

Whitten-Computer:folders2flickr chris$ python folders2flickr 
using uploadr.ini file "/Users/chris/Desktop/folders2flickr/uploadr.ini"
2014-04-11 00:13:20,196 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.45.12.jpg with tags #/Albania/Chris/2013-03-10#14.45.12.jpg "" "Albania" "Chris"
2014-04-11 00:13:36,353 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.45.35.jpg with tags #/Albania/Chris/2013-03-10#14.45.35.jpg "" "Albania" "Chris"
2014-04-11 00:13:50,734 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.45.37.jpg with tags #/Albania/Chris/2013-03-10#14.45.37.jpg "" "Albania" "Chris"
2014-04-11 00:14:00,886 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.45.46.jpg with tags #/Albania/Chris/2013-03-10#14.45.46.jpg "" "Albania" "Chris"
2014-04-11 00:14:08,150 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.45.55.jpg with tags #/Albania/Chris/2013-03-10#14.45.55.jpg "" "Albania" "Chris"
2014-04-11 00:14:18,816 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.46.53.jpg with tags #/Albania/Chris/2013-03-10#14.46.53.jpg "" "Albania" "Chris"
2014-04-11 00:14:26,622 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.47.28.jpg with tags #/Albania/Chris/2013-03-10#14.47.28.jpg "" "Albania" "Chris"
2014-04-11 00:14:41,288 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.47.38.jpg with tags #/Albania/Chris/2013-03-10#14.47.38.jpg "" "Albania" "Chris"
2014-04-11 00:14:57,148 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.47.50.jpg with tags #/Albania/Chris/2013-03-10#14.47.50.jpg "" "Albania" "Chris"
2014-04-11 00:15:01,701 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.47.59.jpg with tags #/Albania/Chris/2013-03-10#14.47.59.jpg "" "Albania" "Chris"
2014-04-11 00:15:16,201 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.48.04.jpg with tags #/Albania/Chris/2013-03-10#14.48.04.jpg "" "Albania" "Chris"
2014-04-11 00:15:28,252 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.48.08.jpg with tags #/Albania/Chris/2013-03-10#14.48.08.jpg "" "Albania" "Chris"
2014-04-11 00:15:40,728 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.48.15.jpg with tags #/Albania/Chris/2013-03-10#14.48.15.jpg "" "Albania" "Chris"
2014-04-11 00:15:52,470 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.49.37.jpg with tags #/Albania/Chris/2013-03-10#14.49.37.jpg "" "Albania" "Chris"
2014-04-11 00:16:07,334 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.49.39.jpg with tags #/Albania/Chris/2013-03-10#14.49.39.jpg "" "Albania" "Chris"
2014-04-11 00:16:22,448 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.49.58.jpg with tags #/Albania/Chris/2013-03-10#14.49.58.jpg "" "Albania" "Chris"
2014-04-11 00:16:35,687 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.50.03.jpg with tags #/Albania/Chris/2013-03-10#14.50.03.jpg "" "Albania" "Chris"
2014-04-11 00:16:50,428 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.50.11.jpg with tags #/Albania/Chris/2013-03-10#14.50.11.jpg "" "Albania" "Chris"
2014-04-11 00:17:01,763 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.50.31.jpg with tags #/Albania/Chris/2013-03-10#14.50.31.jpg "" "Albania" "Chris"
2014-04-11 00:17:15,246 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.50.36.jpg with tags #/Albania/Chris/2013-03-10#14.50.36.jpg "" "Albania" "Chris"
2014-04-11 00:17:27,092 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.50.39.jpg with tags #/Albania/Chris/2013-03-10#14.50.39.jpg "" "Albania" "Chris"
Generating set Albania Chris with 40 pictures
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 851, in emit
    msg = self.format(record)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 464, in format
    record.message = record.getMessage()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 328, in getMessage
    msg = msg % self.args
  File "/Users/chris/Desktop/folders2flickr/f2flickr/flickr.py", line 169, in __str__
    return '<Flickr Photo %s>' % self.id
  File "/Users/chris/Desktop/folders2flickr/f2flickr/flickr.py", line 109, in __getattr__
    self._load_properties()
  File "/Users/chris/Desktop/folders2flickr/f2flickr/flickr.py", line 120, in _load_properties
    data = _doget(method, photo_id=self.id)
  File "/Users/chris/Desktop/folders2flickr/f2flickr/flickr.py", line 854, in _doget
    return _get_data(minidom.parse(urlopen(url)))
  File "/Users/chris/Desktop/folders2flickr/f2flickr/flickr.py", line 885, in _get_data
    raise FlickrError, msg
FlickrError: ERROR [1]: Photo "13774050564" not found (invalid ID)
Logged from file tags2set.py, line 42
2014-04-11 00:17:49,641 tags2set: Cannot create set "Albania Chris"
2014-04-11 00:17:49,641 ERROR [2]: Invalid primary photo id (13774050564)
2014-04-11 00:17:49,642 <class 'f2flickr.flickr.FlickrError'>
2014-04-11 00:17:49,642 tags2set: Cannot edit set Albania Chris
2014-04-11 00:17:49,642 'NoneType' object has no attribute 'editPhotos'
2014-04-11 00:17:49,642 <type 'exceptions.AttributeError'>
2014-04-11 00:17:49,691 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.50.53.jpg with tags #/Albania/Chris/2013-03-10#14.50.53.jpg "" "Albania" "Chris"
2014-04-11 00:18:01,023 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.50.58.jpg with tags #/Albania/Chris/2013-03-10#14.50.58.jpg "" "Albania" "Chris"
2014-04-11 00:18:12,895 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.51.01.jpg with tags #/Albania/Chris/2013-03-10#14.51.01.jpg "" "Albania" "Chris"
2014-04-11 00:18:21,479 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.51.33.jpg with tags #/Albania/Chris/2013-03-10#14.51.33.jpg "" "Albania" "Chris"
2014-04-11 00:18:34,024 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.51.42.jpg with tags #/Albania/Chris/2013-03-10#14.51.42.jpg "" "Albania" "Chris"
2014-04-11 00:18:44,434 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.51.57.jpg with tags #/Albania/Chris/2013-03-10#14.51.57.jpg "" "Albania" "Chris"
2014-04-11 00:18:57,915 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.52.16.jpg with tags #/Albania/Chris/2013-03-10#14.52.16.jpg "" "Albania" "Chris"
2014-04-11 00:19:05,066 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.52.30.jpg with tags #/Albania/Chris/2013-03-10#14.52.30.jpg "" "Albania" "Chris"
2014-04-11 00:19:19,615 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.52.34.jpg with tags #/Albania/Chris/2013-03-10#14.52.34.jpg "" "Albania" "Chris"
2014-04-11 00:19:28,321 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.53.19.jpg with tags #/Albania/Chris/2013-03-10#14.53.19.jpg "" "Albania" "Chris"
2014-04-11 00:19:36,538 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.53.55.jpg with tags #/Albania/Chris/2013-03-10#14.53.55.jpg "" "Albania" "Chris"
2014-04-11 00:19:51,113 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.54.26.jpg with tags #/Albania/Chris/2013-03-10#14.54.26.jpg "" "Albania" "Chris"
2014-04-11 00:20:06,439 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.54.56.jpg with tags #/Albania/Chris/2013-03-10#14.54.56.jpg "" "Albania" "Chris"
2014-04-11 00:20:18,234 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.54.59.jpg with tags #/Albania/Chris/2013-03-10#14.54.59.jpg "" "Albania" "Chris"
2014-04-11 00:20:29,746 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.55.09.jpg with tags #/Albania/Chris/2013-03-10#14.55.09.jpg "" "Albania" "Chris"
2014-04-11 00:20:41,744 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.56.13.jpg with tags #/Albania/Chris/2013-03-10#14.56.13.jpg "" "Albania" "Chris"
2014-04-11 00:20:53,981 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.56.23.jpg with tags #/Albania/Chris/2013-03-10#14.56.23.jpg "" "Albania" "Chris"
2014-04-11 00:21:07,491 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.56.25.jpg with tags #/Albania/Chris/2013-03-10#14.56.25.jpg "" "Albania" "Chris"
2014-04-11 00:21:23,359 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.56.50.jpg with tags #/Albania/Chris/2013-03-10#14.56.50.jpg "" "Albania" "Chris"
2014-04-11 00:21:34,096 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.56.52.jpg with tags #/Albania/Chris/2013-03-10#14.56.52.jpg "" "Albania" "Chris"
2014-04-11 00:21:45,951 (<class 'urllib2.URLError'>, URLError(error(60, 'Operation timed out'),), <traceback object at 0x10e394290>)
2014-04-11 00:21:46,093 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.57.22.jpg with tags #/Albania/Chris/2013-03-10#14.57.22.jpg "" "Albania" "Chris"
2014-04-11 00:21:58,325 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.57.59.jpg with tags #/Albania/Chris/2013-03-10#14.57.59.jpg "" "Albania" "Chris"
Generating set Albania Chris with 61 pictures
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 851, in emit
    msg = self.format(record)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 464, in format
    record.message = record.getMessage()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 328, in getMessage
    msg = msg % self.args
  File "/Users/chris/Desktop/folders2flickr/f2flickr/flickr.py", line 169, in __str__
    return '<Flickr Photo %s>' % self.id
  File "/Users/chris/Desktop/folders2flickr/f2flickr/flickr.py", line 109, in __getattr__
    self._load_properties()
  File "/Users/chris/Desktop/folders2flickr/f2flickr/flickr.py", line 120, in _load_properties
    data = _doget(method, photo_id=self.id)
  File "/Users/chris/Desktop/folders2flickr/f2flickr/flickr.py", line 854, in _doget
    return _get_data(minidom.parse(urlopen(url)))
  File "/Users/chris/Desktop/folders2flickr/f2flickr/flickr.py", line 885, in _get_data
    raise FlickrError, msg
FlickrError: ERROR [1]: Photo "13774050564" not found (invalid ID)
Logged from file tags2set.py, line 42
2014-04-11 00:22:19,570 tags2set: Cannot create set "Albania Chris"
2014-04-11 00:22:19,570 ERROR [2]: Invalid primary photo id (13774050564)
2014-04-11 00:22:19,570 <class 'f2flickr.flickr.FlickrError'>
2014-04-11 00:22:19,570 tags2set: Cannot edit set Albania Chris
2014-04-11 00:22:19,571 'NoneType' object has no attribute 'editPhotos'
2014-04-11 00:22:19,571 <type 'exceptions.AttributeError'>
2014-04-11 00:22:19,627 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.58.04.jpg with tags #/Albania/Chris/2013-03-10#14.58.04.jpg "" "Albania" "Chris"
2014-04-11 00:22:38,297 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.59.01.jpg with tags #/Albania/Chris/2013-03-10#14.59.01.jpg "" "Albania" "Chris"
2014-04-11 00:22:59,723 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.59.09.jpg with tags #/Albania/Chris/2013-03-10#14.59.09.jpg "" "Albania" "Chris"
2014-04-11 00:23:10,123 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 14.59.18.jpg with tags #/Albania/Chris/2013-03-10#14.59.18.jpg "" "Albania" "Chris"
2014-04-11 00:23:19,734 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 15.10.23.jpg with tags #/Albania/Chris/2013-03-10#15.10.23.jpg "" "Albania" "Chris"
2014-04-11 00:23:28,770 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 15.12.53.jpg with tags #/Albania/Chris/2013-03-10#15.12.53.jpg "" "Albania" "Chris"
2014-04-11 00:23:43,113 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 15.13.01.jpg with tags #/Albania/Chris/2013-03-10#15.13.01.jpg "" "Albania" "Chris"
2014-04-11 00:23:54,356 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 15.13.06.jpg with tags #/Albania/Chris/2013-03-10#15.13.06.jpg "" "Albania" "Chris"
2014-04-11 00:24:04,559 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 15.44.23.jpg with tags #/Albania/Chris/2013-03-10#15.44.23.jpg "" "Albania" "Chris"
2014-04-11 00:24:17,418 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 15.45.09.jpg with tags #/Albania/Chris/2013-03-10#15.45.09.jpg "" "Albania" "Chris"
2014-04-11 00:24:31,298 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 15.45.10 HDR.jpg with tags #/Albania/Chris/2013-03-10#15.45.10#HDR.jpg "" "Albania" "Chris"
2014-04-11 00:24:46,686 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 15.45.33 HDR.jpg with tags #/Albania/Chris/2013-03-10#15.45.33#HDR.jpg "" "Albania" "Chris"
2014-04-11 00:25:03,647 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 15.45.33.jpg with tags #/Albania/Chris/2013-03-10#15.45.33.jpg "" "Albania" "Chris"
2014-04-11 00:25:12,318 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 15.47.04 HDR.jpg with tags #/Albania/Chris/2013-03-10#15.47.04#HDR.jpg "" "Albania" "Chris"
2014-04-11 00:25:27,299 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 15.47.04.jpg with tags #/Albania/Chris/2013-03-10#15.47.04.jpg "" "Albania" "Chris"
2014-04-11 00:25:41,556 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 15.47.12.jpg with tags #/Albania/Chris/2013-03-10#15.47.12.jpg "" "Albania" "Chris"
2014-04-11 00:25:53,815 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 15.47.16.jpg with tags #/Albania/Chris/2013-03-10#15.47.16.jpg "" "Albania" "Chris"
2014-04-11 00:26:03,482 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 15.47.22.jpg with tags #/Albania/Chris/2013-03-10#15.47.22.jpg "" "Albania" "Chris"
2014-04-11 00:26:17,897 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 15.47.40.jpg with tags #/Albania/Chris/2013-03-10#15.47.40.jpg "" "Albania" "Chris"
2014-04-11 00:26:29,903 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 15.59.04.jpg with tags #/Albania/Chris/2013-03-10#15.59.04.jpg "" "Albania" "Chris"
2014-04-11 00:26:45,561 Uploading image /Users/chris/Desktop/Kiva Stuff/Albania/Chris/2013-03-10 15.59.53.jpg with tags #/Albania/Chris/2013-03-10#15.59.53.jpg "" "Albania" "Chris"
Generating set Albania Chris with 82 pictures
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 851, in emit
    msg = self.format(record)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 464, in format
    record.message = record.getMessage()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 328, in getMessage
    msg = msg % self.args
  File "/Users/chris/Desktop/folders2flickr/f2flickr/flickr.py", line 169, in __str__
    return '<Flickr Photo %s>' % self.id
  File "/Users/chris/Desktop/folders2flickr/f2flickr/flickr.py", line 109, in __getattr__
    self._load_properties()
  File "/Users/chris/Desktop/folders2flickr/f2flickr/flickr.py", line 120, in _load_properties
    data = _doget(method, photo_id=self.id)
  File "/Users/chris/Desktop/folders2flickr/f2flickr/flickr.py", line 854, in _doget
    return _get_data(minidom.parse(urlopen(url)))
  File "/Users/chris/Desktop/folders2flickr/f2flickr/flickr.py", line 885, in _get_data
    raise FlickrError, msg
FlickrError: ERROR [1]: Photo "13774050564" not found (invalid ID)
Logged from file tags2set.py, line 42
2014-04-11 00:27:08,450 tags2set: Cannot create set "Albania Chris"
2014-04-11 00:27:08,450 ERROR [2]: Invalid primary photo id (13774050564)
2014-04-11 00:27:08,450 <class 'f2flickr.flickr.FlickrError'>
2014-04-11 00:27:08,450 tags2set: Cannot edit set Albania Chris
2014-04-11 00:27:08,450 'NoneType' object has no attribute 'editPhotos'
2014-04-11 00:27:08,450 <type 'exceptions.AttributeError'>

Feature request: sync service

I'm a new flickr user who is used to dropbox, and I'm missing being able to have a local copy of all my photos that remains in sync with the remote service. I'm thinking about extending folders2flickr to do this, but I'm not sure how it fits with the existing module.

I'm thinking about using inotify (or something similar to make it cross platform) to work out when something has changed locally, then polling flickr.photos.recentlyUpdated with a single result to work out when something has changed remotely. I hope that all I need is a "last synced timestamp" file rather than an entire history file to work out what needs to be uploaded/downloaded.

However, I'm not sure about the local folder structure. I store my files by dated folders and all have unique file names, so I could map any photo on flickr to a full path on the local filesystem. I'm also not quite sure what to do with the collection (is that album?) name. I understand photos can appear in multiple collections so it probably can't appear in the folder structure, maybe a tag? I would also like to tag files in flickr and get these tags into the EXIF data on the local file. This probably needs a bit of care.

I'm a reasonably proficient python programmer, but I'm new to flickr and github so any pointers are much appreciated!

Memory Error - EXIF

I see a similar issue has already been reported here....
#21

... but sounded like you were working on a workaround?

I thought there was a setting just to ignore the EXIF routine entirely when running your python, is that available?

Below is the verbose debug output from the EXIF module...

2014-11-03 19:17:48,803 DEBUG Getting EXIF for D:\Users\dj concise\Pictures\Image Library\20020421\CIMG0064.JPG
2014-11-03 19:17:48,815 DEBUG JPEG format recognized data[0:2]=0xFFD8
2014-11-03 19:17:48,815 DEBUG data[2]=0xFF data[3]=0xE1 data[6:10]=Exif
2014-11-03 19:17:48,815 DEBUG Segment base 0x2
2014-11-03 19:17:48,815 DEBUG APP1 at base 0x2
2014-11-03 19:17:48,815 DEBUG Length: 0xA2 0x34
2014-11-03 19:17:48,815 DEBUG Code: Exif
2014-11-03 19:17:48,815 DEBUG Decrement base by 2 to get to pre-segment header (for compatibility with later code)
2014-11-03 19:17:48,815 DEBUG Endian format is M (Motorola)
2014-11-03 19:17:48,815 DEBUG IFD 0 (Image) at offset 8:
2014-11-03 19:17:48,815 DEBUG Make: (0x010F) ASCII=CASIO COMPUTER CO.,LTD. @ 146
2014-11-03 19:17:48,816 DEBUG Model: (0x0110) ASCII=EX-M2 @ 170
2014-11-03 19:17:48,816 DEBUG Orientation: (0x0112) Short=Horizontal (normal) @ 42
2014-11-03 19:17:48,816 DEBUG XResolution: (0x011A) Ratio=72 @ 178
2014-11-03 19:17:48,816 DEBUG YResolution: (0x011B) Ratio=72 @ 186
2014-11-03 19:17:48,816 DEBUG ResolutionUnit: (0x0128) Short=Pixels/Inch @ 78
2014-11-03 19:17:48,816 DEBUG Software: (0x0131) ASCII=1.01+R @ 194
2014-11-03 19:17:48,816 DEBUG DateTime: (0x0132) ASCII=2002:04:21 00:30:33 @ 216
2014-11-03 19:17:48,816 DEBUG YCbCrPositioning: (0x0213) Short=Centered @ 114
2014-11-03 19:17:48,816 DEBUG ExifOffset: (0x8769) Long=276 @ 126
2014-11-03 19:17:48,818 DEBUG PrintIM: (0xC4A5) Undefined=[80, 114, 105, 110, 116, 73, 77, 0, 48, 50, 53, 48, 0, 0, 0, 4, 0, 1, 0, 22, 0, 22, 0, 2, 1, 0, 0, 0, 1, 0, 5, 0, 0, 0, 1, 1, 1, 0, 0, 0] @ 236
2014-11-03 19:17:48,818 DEBUG Exif SubIFD at offset 276:
2014-11-03 19:17:48,818 DEBUG ExposureTime: (0x829A) Ratio=1/40 @ 654
2014-11-03 19:17:48,818 DEBUG FNumber: (0x829D) Ratio=16/5 @ 662
2014-11-03 19:17:48,818 DEBUG ExposureProgram: (0x8822) Short=Program Normal @ 310
2014-11-03 19:17:48,818 DEBUG ExifVersion: (0x9000) Undefined=0220 @ 322
2014-11-03 19:17:48,818 DEBUG DateTimeOriginal: (0x9003) ASCII=2002:04:21 00:30:33 @ 670
2014-11-03 19:17:48,818 DEBUG DateTimeDigitized: (0x9004) ASCII=2002:04:21 00:30:33 @ 690
2014-11-03 19:17:48,818 DEBUG ComponentsConfiguration: (0x9101) Undefined=YCbCr @ 358
2014-11-03 19:17:48,819 DEBUG CompressedBitsPerPixel: (0x9102) Ratio=12/25 @ 710
2014-11-03 19:17:48,819 DEBUG ExposureBiasValue: (0x9204) Signed Ratio=0 @ 718
2014-11-03 19:17:48,819 DEBUG MaxApertureValue: (0x9205) Ratio=16/5 @ 726
2014-11-03 19:17:48,819 DEBUG MeteringMode: (0x9207) Short=Pattern @ 406
2014-11-03 19:17:48,819 DEBUG LightSource: (0x9208) Short=Unknown @ 418
2014-11-03 19:17:48,819 DEBUG Flash: (0x9209) Short=Flash did not fire, auto mode @ 430
2014-11-03 19:17:48,819 DEBUG FocalLength: (0x920A) Ratio=15/2 @ 734
2014-11-03 19:17:48,982 DEBUG MakerNote: (0x927C) Undefined=[81, 86, 67, 0, 0, 0, 0, 35, 0, 2, 0, 3, 0, 0, 0, 2, 1, 64, 0, 240, ... ] @ 750
2014-11-03 19:17:48,982 DEBUG FlashPixVersion: (0xA000) Undefined=0100 @ 466
2014-11-03 19:17:48,982 DEBUG ColorSpace: (0xA001) Short=sRGB @ 478
2014-11-03 19:17:48,982 DEBUG ExifImageWidth: (0xA002) Long=1600 @ 490
2014-11-03 19:17:48,982 DEBUG ExifImageLength: (0xA003) Long=1200 @ 502
2014-11-03 19:17:48,982 DEBUG InteroperabilityOffset: (0xA005) Long=33158 @ 514
2014-11-03 19:17:48,982 DEBUG FileSource: (0xA300) Undefined=Digital Camera @ 526
2014-11-03 19:17:48,982 DEBUG CustomRendered: (0xA401) Short=Normal @ 538
2014-11-03 19:17:48,982 DEBUG ExposureMode: (0xA402) Short=Auto Exposure @ 550
2014-11-03 19:17:48,983 DEBUG WhiteBalance: (0xA403) Short=Auto @ 562
2014-11-03 19:17:48,983 DEBUG DigitalZoomRatio: (0xA404) Ratio=0 @ 742
2014-11-03 19:17:48,983 DEBUG FocalLengthIn35mmFilm: (0xA405) Short=36 @ 586
2014-11-03 19:17:48,983 DEBUG SceneCaptureType: (0xA406) Short=Standard @ 598
2014-11-03 19:17:48,983 DEBUG GainControl: (0xA407) Short=Low gain up @ 610
2014-11-03 19:17:48,983 DEBUG Contrast: (0xA408) Short=Normal @ 622
2014-11-03 19:17:48,983 DEBUG Saturation: (0xA409) Short=Normal @ 634
2014-11-03 19:17:48,983 DEBUG Sharpness: (0xA40A) Short=Normal @ 646
2014-11-03 19:17:48,983 DEBUG IFD 1 (Thumbnail) at offset 33188:
2014-11-03 19:17:48,983 DEBUG Compression: (0x0103) Short=JPEG (old-style) @ 33198
2014-11-03 19:17:48,983 DEBUG XResolution: (0x011A) Ratio=72 @ 33266
2014-11-03 19:17:48,983 DEBUG YResolution: (0x011B) Ratio=72 @ 33274
2014-11-03 19:17:48,983 DEBUG ResolutionUnit: (0x0128) Short=Pixels/Inch @ 33234
2014-11-03 19:17:48,983 DEBUG JPEGInterchangeFormat: (0x0201) Long=33282 @ 33246
2014-11-03 19:17:48,983 DEBUG JPEGInterchangeFormatLength: (0x0202) Long=8234 @ 33258
2014-11-03 19:17:48,983 DEBUG RecordingMode: (0x0001) Long= @ 196608
2014-11-03 19:17:48,984 DEBUG RecordingMode: (0x0001) ASCII='\x92''K''k''\x06''\x89''\xac''\xcd''\x06''\x99''8''\xbb''\x8a'')''\x19''\x16''\xe9''>''\xeb''\xe0''\x91''\xb8''''U''\xd5''\x1a''\x8e''H''\xaa''\x92''N''\xd1''\xd8''\xfa''\xe7''\xc6''\x9e''\x15''\x9e''\xf7''\xe1''c''\xeb''d''\xc1''\x03''\xcd''9''L''\x9f''\x9b''\x01''\x86''s''\x8c''\xfb''\x1f''\xce''\xbe''Y''\xd2''\xd6''\xc3''\xc1''\xda''s''\xcd''\xa4''\xe1''/''d''\x1c''\xca''\x17''x''\x90''\xf6''\xc9''\xed''\x8a''\xb2''5''\t''\xb5''\x88''c''\x83''Y''\xba''\xbc''\x9e''\x14''\x91''@''L''\x13''\xdc''v''\x1c''v''\x15''\xb7''\xaf''%''\x9d''\xab''\xc1''o''\xa7''C''\xb1''U''z''\x10''\x0e''\x07''l''\xe2''\xb2''\x92''n''w''G''\x95''\x04''\x9d''\xae''\xad''c''\xc4''<''M''\xe2''[''\xbf''\x12''\xea''\x82''m''z''a''%''\xc1'']''\x88''\x14''m''\x18''\x1d''+''\xcc''S''K''\x96''y''\xa4''\xbb''\x11''\xb1''\x08''H''\xde''\xdc''\x03''^''\xc9''\xe2''{''\x0b''m''2''\xf5''%''\x11''\xc9''(''e'',''\x19''\x97' @ 196608
2014-11-03 19:17:48,984 DEBUG Quality: (0x0002) Ratio= @ 458752
2014-11-03 19:17:48,984 DEBUG RecordingMode: (0x0001) Byte= @ 196608
2014-11-03 19:17:48,984 DEBUG RecordingMode: (0x0001) ASCII='\x92''K''k''\x06''\x89''\xac''\xcd''\x06''\x99''8''\xbb''\x8a'')''\x19''\x16''\xe9''>''\xeb''\xe0''\x91''\xb8''
''U''\xd5''\x1a''\x8e''H''\xaa''\x92''N''\xd1''\xd8''\xfa''\xe7''\xc6''\x9e''\x15''\x9e''\xf7''\xe1''c''\xeb''d''\xc1''\x03''\xcd''9''L''\x9f''\x9b''\x01''\x86''s''\x8c''\xfb''\x1f''\xce''\xbe''Y''\xd2''\xd6''\xc3''\xc1''\xda''s''\xcd''\xa4''\xe1''/''d''\x1c''\xca''\x17''x''\x90''\xf6''\xc9''\xed''\x8a''\xb2''5''\t''\xb5''\x88''c''\x83''Y''\xba''\xbc''\x9e''\x14''\x91''@''L''\x13''\xdc''v''\x1c''v''\x15''\xb7''\xaf''%''\x9d''\xab''\xc1''o''\xa7''C''\xb1''U''z''\x10''\x0e''\x07''l''\xe2''\xb2''\x92''n''w''G''\x95''\x04''\x9d''\xae''\xad''c''\xc4''<''M''\xe2''[''\xbf''\x12''\xea''\x82''m''z''a''%''\xc1'']''\x88''\x14''m''\x18''\x1d''+''\xcc''S''K''\x96''y''\xa4''\xbb''\x11''\xb1''\x08''H''\xde''\xdc''\x03''^''\xc9''\xe2''{''\x0b''m''2''\xf5''%''\x11''\xc9''(''e'',''\x19''\x97' @ 196608
2014-11-03 19:17:48,986 DEBUG RecordingMode: (0x0001) Byte= @ 196608
2014-11-03 19:17:48,986 DEBUG RecordingMode: (0x0001) Short= @ 196608
2014-11-03 19:17:48,986 DEBUG RecordingMode: (0x0001) Byte= @ 196608
2014-11-03 19:17:48,986 DEBUG RecordingMode: (0x0001) Byte= @ 196608
2014-11-03 19:17:48,986 DEBUG Tag 0x0277: (0x0277) Byte=[] @ 86061318
2014-11-03 19:17:49,019 DEBUG Tag 0x0000: (0x0000) Long=[] @ 131079
2014-11-03 19:17:49,019 DEBUG Tag 0x0000: (0x0000) Long=[] @ 0
2014-11-03 19:17:49,086 DEBUG Tag 0x0121: (0x0121) ASCII= @ 33544704
2014-11-03 19:17:49,094 DEBUG Tag 0x8B48: (0x8B48) Long=[] @ 3846151549
2014-11-03 19:17:49,164 DEBUG Tag 0x0122: (0x0122) ASCII= @ 33544704
2014-11-03 19:17:49,216 ERROR error uploading
Traceback (most recent call last):
File "uploadr.py", line 327, in uploadImage
exiftags = exif.process_file(f)
File "C:\Users\awise\Downloads\folders2flickr v1\exifread__init__.py", line 221, in process_file
hdr.decode_maker_note()
File "C:\Users\awise\Downloads\folders2flickr v1\exifread\classes.py", line 401, in decode_maker_note
tag_dict=makernote.CASIO)
File "C:\Users\awise\Downloads\folders2flickr v1\exifread\classes.py", line 181, in dump_IFD
values = self.file.read(count)
MemoryError

Maintaining sync?

How does folders2flickr maintain a sync? I have used another script to do my current sync and I want to avoid re-syncing? Is it a filename as a tag?

Check size < maximum allowed size before uploading

I have a failing upload for a 1.3GB file (maximum allowed video is 1GB)

2015-11-14 13:01:13,989 uploadr.py:532 -          uploadImage() Upload failed
Traceback (most recent call last):
  File "/home/simon/Documents/src/folders2flickr/f2flickr/uploadr.py", line 515, in uploadImage
    res = getResponse(url)
  File "/home/simon/Documents/src/folders2flickr/f2flickr/uploadr.py", line 102, in getResponse
    data = flickr.unmarshal(minidom.parse(urllib2.urlopen(url)))
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1222, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 32] Broken pipe>

Error creating sets.

I deleted the history file, remove the logs and wiped everything from flickr.
My config has the following:
only_sub_sets = false
full_folder_tags = true

I go to upload 4 pictures in 2 different directories.
./archive1/Quebec City, Sept 2005:
IMG_7876.JPG IMG_7877.JPG
./archive1/Sterwart Park, Perth:
IMG_7872.JPG IMG_7873.JPG

I get the following script output:
using uploadr.ini file "/root/folders2flickr/uploadr.ini"
2014-08-26 23:57:07,441 Uploading image /share/photos/test/archive1/Quebec City, Sept 2005/IMG_7876.JPG with tags #/archive1/Quebec#City,#Sept#2005/IMG_7876.JPG "" "archive1" "Quebec City, Sept 2005"
2014-08-26 23:57:15,966 Uploading image /share/photos/test/archive1/Quebec City, Sept 2005/IMG_7877.JPG with tags #/archive1/Quebec#City,#Sept#2005/IMG_7877.JPG "" "archive1" "Quebec City, Sept 2005"
2014-08-26 23:57:30,395 Uploading image /share/photos/test/archive1/Sterwart Park, Perth/IMG_7872.JPG with tags #/archive1/Sterwart#Park,#Perth/IMG_7872.JPG "" "archive1" "Sterwart Park, Perth"
2014-08-26 23:57:39,393 Uploading image /share/photos/test/archive1/Sterwart Park, Perth/IMG_7873.JPG with tags #/archive1/Sterwart#Park,#Perth/IMG_7873.JPG "" "archive1" "Sterwart Park, Perth"
Generating set archive1 Quebec City, Sept 2005 with 2 pictures
2014-08-26 23:57:51,178 tags2set: Cannot edit set archive1 Quebec City, Sept 2005
2014-08-26 23:57:51,179 mismatched tag: line 162, column 2
2014-08-26 23:57:51,180 <class 'xml.parsers.expat.ExpatError'>
Generating set archive1 Quebec City, Sept 2005 with 2 pictures
Generating set archive1 Sterwart Park, Perth with 2 pictures

At the end of the debug.log I see:
2014-08-26 23:57:47,735 DEBUG tags2set: Started tags2set
2014-08-26 23:57:48,846 DEBUG tags2set: Adding image /archive1/Quebec City, Sept 2005/IMG_7876.JPG
2014-08-26 23:57:48,846 DEBUG tags2set: Adding image /archive1/Quebec City, Sept 2005/IMG_7877.JPG
2014-08-26 23:57:48,848 DEBUG Generating set archive1 Quebec City, Sept 2005 with 2 pictures
2014-08-26 23:57:48,849 DEBUG tags2set: create set archive1 Quebec City, Sept 2005 with photo <Flickr Photo 14863030469>
2014-08-26 23:57:49,859 DEBUG tags2set: created new set archive1 Quebec City, Sept 2005
2014-08-26 23:57:51,178 ERROR tags2set: Cannot edit set archive1 Quebec City, Sept 2005
2014-08-26 23:57:51,179 ERROR mismatched tag: line 162, column 2
2014-08-26 23:57:51,180 ERROR <class 'xml.parsers.expat.ExpatError'>
2014-08-26 23:57:51,181 DEBUG tags2set: ...added 2 photos
2014-08-26 23:57:51,182 DEBUG tags2set: Adding image /archive1/Sterwart Park, Perth/IMG_7872.JPG
2014-08-26 23:57:51,183 DEBUG tags2set: Adding image /archive1/Sterwart Park, Perth/IMG_7873.JPG
2014-08-26 23:57:51,186 DEBUG Generating set archive1 Quebec City, Sept 2005 with 2 pictures
2014-08-26 23:57:51,186 DEBUG tags2set: create set archive1 Quebec City, Sept 2005 with photo <Flickr Photo 14863030469>
2014-08-26 23:57:52,069 DEBUG tags2set: created new set archive1 Quebec City, Sept 2005
2014-08-26 23:57:53,565 DEBUG tags2set: ...added 2 photos
2014-08-26 23:57:53,567 DEBUG Generating set archive1 Sterwart Park, Perth with 2 pictures
2014-08-26 23:57:53,568 DEBUG tags2set: create set archive1 Sterwart Park, Perth with photo <Flickr Photo 15049401662>
2014-08-26 23:57:54,475 DEBUG tags2set: created new set archive1 Sterwart Park, Perth
2014-08-26 23:57:56,003 DEBUG tags2set: ...added 2 photos

Whats wrong?

thanks

Existing folders not used

I'm experiencing an issue when resuming a set upload (added more photos to a folder), or when the total items are greater than 21.

The existing folder is not used in almost all cases. I thought for sure it worked in one test, but that may have just been less than 21 photos/movies in the upload.

Example:
I just uploaded 324 photos, 1 movie. All from one folder. The movie and 20 photos went into a set. The other 303 photos were tagged properly but not placed into any set.

The folder/set name is "2014-01 Costa Rica".

I know that the one that re-used an existing set did not have a dash in it, but was something like "200809 description". However, I've had a similarly named folder fail to use the existing set.

The debug log shows that tags2set.py finds the proper set ID, and then it just lists all 325 items as it adds each. Yet the actual set only contains the first 21 items.

Let me know if I can help at all.

I'm running this on an Ubuntu 13.04 server. I have the tags2set.py from commit b7e486d.

error in exifread.make_string(eval(printable))

I get this error:
2016-08-16 11:51:25,619 uploadr.py:532 - uploadImage() Upload failed
Traceback (most recent call last):
File "/home/vannoord/.local/lib/python2.7/site-packages/f2flickr/uploadr.py", line 494, in uploadImage
exifstring = exifread.make_string(eval(printable))
File "", line 1
[100, 0, 111, 0, 107, 0, 107, 0, 117, 0, 109, 0, 32, 0, 101, 0, 110, 0, 32, 0, ... ]

it does not tell me which photo is to blame (assuming there is a foto with buggy exif).

I changed line 532 into
logging.exception("Upload failed: %s",image)
to see which file causes problems

Unable to upload

2014-05-14 22:21:32,424 INFO Uploading image /Volumes/dsG/iPhone/Media/100APPLE/IMG_0002.JPG with tags  #/100APPLE/IMG_0002.JPG 100APPLE
2014-05-14 22:21:38,408 ERROR (<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x10a4db368>)

support for replace

It would be nice if files which had changed would be replaced rather than deleted and newly uploaded...

Tracebacks not logged

I'm getting some exceptions while running, but the tracebacks aren't logged.

Could you please make sure the tracebacks get logged so that I can send in useful problem reports?

Regards /Johan

Sample output with tracebackless exceptions:

2015-05-01 20:19:59,469 uploadr.py:498 -          uploadImage() Uploading image C:\Users\Acer\Pictures\2013-11-29\DSCN6370-001.JPG with tags "#\2013-11-29\DSCN6370-001.JPG" "" "2013-11-29"
2015-05-01 20:20:15,621 uploadr.py:498 -          uploadImage() Uploading image C:\Users\Acer\Pictures\2013-11-29\DSCN6370.JPG with tags "#\2013-11-29\DSCN6370.JPG" "" "2013-11-29"
2015-05-01 20:20:28,536 uploadr.py:498 -          uploadImage() Uploading image C:\Users\Acer\Pictures\2013-11-29\DSCN6371-001.AVI with tags "#\2013-11-29\DSCN6371-001.AVI" "" "2013-11-29"
2015-05-01 20:20:31,851 uploadr.py:532 -          uploadImage() (<type 'exceptions.MemoryError'>, MemoryError(), <traceback object at 0x02A58738>)
2015-05-01 20:20:31,944 uploadr.py:498 -          uploadImage() Uploading image C:\Users\Acer\Pictures\2013-11-29\DSCN6371.AVI with tags "#\2013-11-29\DSCN6371.AVI" "" "2013-11-29"
2015-05-01 20:20:35,183 uploadr.py:532 -          uploadImage() (<type 'exceptions.MemoryError'>, MemoryError(), <traceback object at 0x02A589B8>)
2015-05-01 20:20:35,653 uploadr.py:498 -          uploadImage() Uploading image C:\Users\Acer\Pictures\2013-11-29\DSCN6372-001.JPG with tags "#\2013-11-29\DSCN6372-001.JPG" "" "2013-11-29"
2015-05-01 20:20:51,812 uploadr.py:498 -          uploadImage() Uploading image C:\Users\Acer\Pictures\2013-11-29\DSCN6372.JPG with tags "#\2013-11-29\DSCN6372.JPG" "" "2013-11-29"
2015-05-01 20:21:07,964 uploadr.py:498 -          uploadImage() Uploading image C:\Users\Acer\Pictures\2013-11-29\DSCN6373-001.JPG with tags "#\2013-11-29\DSCN6373-001.JPG" "" "2013-11-29"

Doesn't actually work

All uploads fail with the following errors:

(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c1e1b8>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc107c6a7a0>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c1e440>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc1059f4d40>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c1b3f8>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c2a2d8>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c2a170>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c2a248>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc1059f2758>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc1059f2560>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc1059f2440>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc1059f2ef0>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc1059f24d0>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c17050>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c17e18>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c172d8>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c17440>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c17b90>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c17dd0>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c17b00>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c175a8>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c17518>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c17e60>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c17c68>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc1059fb128>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc1059fbf80>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc1059fbe18>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc107c68200>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc107c69e60>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc108b54e18>)
(<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x7fc105c2a248>)

Installation problem: ImportError: No module named f2flickr.flickr

Hi I am trying to install f2f but i'm getting this error:

i did the local git clone, installed python exif library

but when running:
sudo python folders2flickr/f2flickr/uploadr.py
i get the
ImportError: No module named f2flickr.flickr

How can i proceed? I am totally new to python stuff..

"5 Filetype was not recognised" response

Seems like MOV and MP4 files should be accepted.

2016-01-25 07:34:25,217 uploadr.py:498 - uploadImage() Uploading image /home/sergei/Downloads/Takeout/2/MVI_6137.MOV with tags "#/MVI_6137.MOV" "" ""
problem..
2016-01-25 07:43:27,346 uploadr.py:114 - reportError() ('Error:', '5 Filetype was not recognised')
('Error:', '5 Filetype was not recognised')
2016-01-25 07:43:27,434 uploadr.py:498 - uploadImage() Uploading image /home/sergei/Downloads/Takeout/2/VID_20130522_190251.mp4 with tags "#/VID_20130522_190251.mp4" "" ""
problem..
2016-01-25 07:46:51,897 uploadr.py:114 - reportError() ('Error:', '5 Filetype was not recognised')
('Error:', '5 Filetype was not recognised')
2016-01-25 07:46:51,898 uploadr.py:498 - uploadImage() Uploading image /home/sergei/Downloads/Takeout/2/VID_20130524_143921.mp4 with tags "#/VID_20130524_143921.mp4" "" ""
problem..
2016-01-25 07:47:17,314 uploadr.py:114 - reportError() ('Error:', '5 Filetype was not recognised')

Port to Windows exe?

Been using folders2flickr for a couple of years enduring the various annoying bugs uploading our 10,000 pictures. Agree with your opinion of the tool and its "competitors". Love that you are making some fixes, especially to the initial upload. I'll go through the process of trying to run this version from Windows, but it would be nice (and you'd have a bigger user base) if this was actually ported to Windows.

Make folders2flickr work with Python 3

When I run the script I get this:

$ ./folders2flickr File "./folders2flickr", line 9 except IOError, ex: ^ SyntaxError: invalid syntax
Where the pointer is located under the comma after IOError.

Using python: Python 3.4.1

Multiple Flickr Tokens?

I'm syncing project A to Flickr account A.

I also want to sync my personal photos to my personal account...

Would be fun to have a way to specify this via command-line (as opposed to deleting the flickr token and re-authenticating each time...)

Just a dream...

.f2fignore

I think it would be really nice to have some kind of .f2fignore file in which some specific folders or files can be excluded (e.g. very large movie files or folders that contain a collection of the best photos of the other folders)

Many path to upload images from

Hi,

is it possible to type more than one path in init file i.e.:

imagedir = /home/my_images/cars,/home/my_images/planes,/home/my_images/kids

or like:

imagedir[] = /home/my_images/cars
imagedir[] = /home/my_images/planes
imagedir[] = /home/my_images/kids

so app could proces a couple path, not only pic from one path?

Windows?

I see this has been resurrected from the old Google Code hosted project? That had a Windows version, is this likely to happen for this updated version of the project? Thanks

using german umlaute (äöü) in set names

Modul tag2set.py stops when creating a set from a directory with contains german umlaute (vocals with two dots on it like äöü).

Last entry in debug.log:
" .... Generating set d:\CamPics\test\2011_Gäste-WC with 1 pictures"

Console says:
"UnicodeDecodeError: 'utf8' codec can't decode byte 0xe4 in position 22: invalid continuation byte"

Even if I do not understand this because UTF-8 should be able to handle all characters in the world the following replacement works (on my Win7 PC):

Line 28 in tags2set.py:

old: unicodeSetName = setName.decode('utf-8')

new: encodingType = sys.getfilesystemencoding()
unicodeSetName = setName.decode(encodingType)

Remarks:

  1. Not shure if this occures under windows only.
  2. Not shure if this change is backward compatible with exisiting directories
    So better back up you directory before trying ;-)
    (Are the set names also stored in the directory?)

Help file is missing usage instructions

It explains how to install, great.
It explains how to edit the configuration file, great.
Then it starts to talk about exclusions etc.
There is nothing about running the tool. Where does pip install the executable python script, or how to run it.

I'll keep looking, but a 5 minute fix to the instructions would go a long way.

Ability to prevent photos from appearing in global search

Refer: http://www.flickr.com/services/api/upload.api.html

hidden=1 means keep the photo in global search results
hidden=2 means hide photo from public searches

Provide ability to mention this setting here:
https://github.com/richq/folders2flickr/blob/master/uploadr.ini#L16

Handle this setting here:
https://github.com/richq/folders2flickr/blob/master/f2flickr/uploadr.py#L49
https://github.com/richq/folders2flickr/blob/master/f2flickr/uploadr.py#L353

Please provide this ability.

thanks
Shiv

Broken Recently? (Jun-Jul 14)

I leave this excellent script running in Windows on a scheduled task. I noticed that the last few weeks of photos have not made it up to Flickr. This stopped working sometime at the end of June, start of July. I seem to get getting this pattern of errors for each photo for which upload is attempted, any ideas?

2014-07-20 16:08:45,438 DEBUG Getting EXIF for N:\Photos\2014\2014-06-29 Holiday in Somerset\2014-07-02 12.07.46.jpg
2014-07-20 16:08:46,608 DEBUG Uploading image N:\Photos\2014\2014-06-29 Holiday in Somerset\2014-07-02 12.07.46.jpg
2014-07-20 16:09:00,213 ERROR (<class 'urllib2.HTTPError'>, HTTPError(), <traceback object at 0x0150FCD8>)

KeyError: 'only_sub_sets'

I may be doing something wrong but opening the 'folders2flickr' executable gives me this in the terminal:

~ J$ /Users/J/Sites/folders2flickr/folders2flickr ; exit;


Traceback (most recent call last):
  File "/Users/J/Sites/folders2flickr/folders2flickr", line 3, in <module>
    import f2flickr.uploadr
  File "/Users/J/Sites/folders2flickr/f2flickr/uploadr.py", line 16, in <module>
    import tags2set
  File "/Users/J/Sites/folders2flickr/f2flickr/tags2set.py", line 14, in <module>
    onlySubs = configuration.configdict.get('only_sub_sets')
  File "/Users/J/Sites/folders2flickr/f2flickr/configuration.py", line 24, in get
    raise KeyError(configparam)
KeyError: 'only_sub_sets'
logout

[Process completed]

I've tried setting 'only_sub_sets' to both true and false but it doesn't make a difference.

Uploading without creating sets [OS X]

The upload runs perfectly, but when it tries to create a set, I get the following stack trace:

Traceback (most recent call last):
File "./folders2flickr", line 8, in
f2flickr.uploadr.main()
File "/Users/username/folders2flickr/f2flickr/uploadr.py", line 628, in main
tags2set.createSets(uploadedNow, HISTORY_FILE)
File "/Users/username/folders2flickr/f2flickr/tags2set.py", line 88, in createSets
uploaded = shelve.open( historyFile )
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shelve.py", line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shelve.py", line 223, in init
Shelf.init(self, anydbm.open(filename, flag), protocol, writeback)
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/anydbm.py", line 85, in open
return mod.open(file, flag, mode)
gdbm.error: (35, 'Resource temporarily unavailable')

The debug.log says:
2014-10-18 01:10:04,118 DEBUG successful.
2014-10-18 01:10:04,121 DEBUG tags2set: Started tags2set

EDIT
I'm just realising that it may not be completely apparent for everybody. I'm on OS X Yosemite with python .7.8 installed via Homebrew.

New fotos in folders are not added to existing set

I am not sure if it is a bug or if it did never work before.

When adding new fotos to a folder on the PC I tought they are addes to the existing set on flickr. They are uploaded but I do not find them in set corresponding set.

(I tried this after some of the photos have been rejected due to issue #21.
Now as the memory error was fixed (or better worked aound) I need to upload the rest of my photos into the set.)

MemoryError on RaspberryPi

I didn't found an issue for this already:

I guess you are loading the whole file into ram before uploading. On small devices like raspberry you can run easily into an out of memory exception. At least that seams to be the issue on my device. I've attached the trace output:


2016-05-30 19:25:16,713 uploadr.py:532 - uploadImage() Upload failed
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/f2flickr/uploadr.py", line 515, in uploadImage
res = getResponse(url)
File "/usr/lib/python2.7/site-packages/f2flickr/uploadr.py", line 102, in getResponse
data = flickr.unmarshal(minidom.parse(urllib2.urlopen(url)))
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1240, in https_open
context=self._context)
File "/usr/lib/python2.7/urllib2.py", line 1194, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/usr/lib/python2.7/httplib.py", line 1057, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1097, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 1053, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 895, in _send_output
msg += message_body

MemoryError

BTW: Thanks for the good and easy tool. 👍 :)

Consider another unique tag solution (instead of folderfilename tag)

The default folderfilename tag seems a bit cludgy -- especially since it makes it really difficult to use the flickr.com/myaccount/tags list (since it has a separate tag for every picture).

I'm mostly writing this to remind myself to look into a more elegant way to mark a photo as unique (and comparable to new photos)....

Prehaps a history record based on filename/exifdate/something-else-non-null instead of tag based...

EXIF fails to read for certain Canon photos

I have a number of photos, from at least one Canon camera (if not others), which fail when attempting to read for upload.

They fail because, apparently, Canon writes makernotes a little differently than most do.
At least that's what I gather after a bit of research.

I attempted to "fix" the issue using exiftool but it still existed.
After more research, I came upon a newer version of the exif.py included in this project.
https://github.com/ianare/exif-py

Check that out, and maybe it could be incorporated into a new release of folders2flickr.

It is no longer a single file, so simply updating this project won't be an option.
I'm new to python or I'd do it myself and submit the change. I've hacked it together for my own purposes but I honestly do not feel 100% certain about my methods. If nothing else, they were not clean (I copied files to multiple places in order to avoid compile errors, etc).

If I get some time, I could retry my efforts. For now, I thought I'd enter an issue so it gets tracked and perhaps properly implemented.

If there are any tips for me, to get me pointed in the right direction, I'm willing to help get things updated.

py2exe dependence

Appreciate your review of the many flickr uploading options and reemergence of this solution.

Trying to run this but cannot get past the py2exe dependency. Have downloaded but unsucessfully installed / pointed folders2flickr to it (either by source or pip).

Any way you could add a few lines to the README to clarify this process of getting it running?

AttributeError: 'Photo' object has no attribute 'delete'

Hi,
Thanks for project, good work :)

When I try upload video (mov ~ 285mb), get:

Traceback (most recent call last):
File "./folders2flickr", line 8, in
f2flickr.uploadr.main()
File "/home/pi/.local/lib/python2.7/site-packages/f2flickr/uploadr.py", line 663, in main
for uploaded in uploadinstance.upload(group):
File "/home/pi/.local/lib/python2.7/site-packages/f2flickr/uploadr.py", line 373, in upload
up = self.uploadImage( image )
File "/home/pi/.local/lib/python2.7/site-packages/f2flickr/uploadr.py", line 405, in uploadImage
photo.delete()
File "/home/pi/.local/lib/python2.7/site-packages/f2flickr/flickr.py", line 116, in getattr
val = self._val(key)
File "/home/pi/.local/lib/python2.7/site-packages/f2flickr/flickr.py", line 113, in _val
return super(Photo, self).getattribute(key)
AttributeError: 'Photo' object has no attribute 'delete'

I tried convert video (e.g mp4) and doesn't work,
Other files *.mov work fine. Only this one file doesn't want upload.
How fix it?
Thanks for reply

Files deleted on flickr aren't replaced

Noticed during testing that if I delete an uploaded file, folders2flickr just checks to see if it's in the history, not still on flickr and assumes it's there...

Perhaps my use case is unique, but I'm using flickr as a backup, and it would be nice to know there is a safety catch if the pic get's accidentally deleted from flickr.

Anyway, just a thought. Cheers!

Readme not clear enough, can be used without web browser?

Hi, I read the readme but didn't quite understand if a web browser is needed.
Original folders2flickr google project says that on first run it will open a web browser to get a token. Does your fork have the same need and works the same way on first run?
The reason why I'm asking is because I would be running folders2flickr on a headless-server, one that doesn't have a keyboard, nor a mouse and nor a video card with a vga. Doesn't even have X11/Xorg installed on it.
Can I use folders2flickr on this server?
Thanks in advance.
Cheers

Feature: personalized upload date

Hi,
I used to use a nice online tool that let you change the upload dates of the pictures in batch ( http://www.h4ppy.com/h4ppier-photos-widget.php ) . Now the site is offline, but I would still need to have the upload date personalized when synching with folders2flickr.
Would it be possible to add this feature? To simplify the feature we could add for example a config flag that would set the upload date as the taken date. (not sure if there is a date upload parameter during upload mode, but I know from the website above it's possible in edit mode)

Thank you.

Upload Single Folder

I already have pictures and videos uploaded to flickr.

Instead of having this script sync all my folders, I'd like to just upload a single folder (or update/sync an already existing set on flickr with additional pictures). If creating a new set, I'd like it to use the name of the folder/directory name.

Is this possible?

changing imagedir without reloading fotos to flickr

Due to the large collection of fotos I have I played with different settings of "imagedir" in uploadr.ini:

  1. I set
    imagedir = d:\CamPics\aaa
    --> all fotos of aaa and subdirectories of aaa were loaded
  2. I changes to a sub directory
    imagedir = d:\CamPics\aaa\bbb
    --> all fotos of aaa\bbb were loaded again and appear twice in flickr

It seems as if the identifier in the history files contains not the full path of the image but a relative path. So the check against double loading fails when you change the starting point in the directory.
I did 2 changes in uploafr.py to use the full path and to avoid the double uplaod to fickr when changing imagedir:

Line 319:
old: if self.uploaded.has_key(folderTag):
new: if self.uploaded.has_key(image):

Line 388:
old: self.logUpload( res.photoid, folderTag )
new: self.logUpload( res.photoid, image )

Being new with python I am not sure if there are any side effects and ask myself if that patch is a good idea.

Does not go to get token page

When initially launching the application, it correctly opens the web browser window, and tries to go to the flickr api authorization page. However, this fails and dumps back to the main flickr page. Tried with both the default api key and with a api key associated with my account. Both show same behaviour. Any ideas how to resolve?
Robert

Existing set not always recognized, new one created instead

From comments on issue #9:

it works fine for a while and then after a while it suddenly starts not to recognize previously created sets anymore and make a new one every 21 photos. After restarting the script, everything is back to normal again. Not quite sure what causes it.

memory error with some photos

With some fotos i got a memory error when uploading them:
2014-03-25 21:27:20,694 (<type 'exceptions.MemoryError'>, MemoryError(), <traceback object at 0x033A45D0>)

It happens when executing line 382:
exiftags = exif.process_file(f)

Any idea what goes wrong?
May be a mistake in the exif modul?

Feature Request: Multi-threaded uploader

I just got the uploader to work and I can see the pictures appearing on my Flickr account, so this is great. However, I noticed that it is taking a very long time to upload each picture. Based on my ISP and the time it usually takes with other uploads, this is very unusual, and perhaps a problem with the Flickr service itself. However, it made me wonder if using multiple threads to upload could effectively improve the bandwidth utilization. Perhaps a simple change could be to allow a thread count to be specified and divide the image set among these threads. Is there something from the API side that would make this difficult or impossible?

Question: about comaptibility to original folders2flickr

Hello

I am using folders2flickr for some time now, but the one from https://code.google.com/p/folders2flickr/
now I have uploaded many photos to flickr and a 10 MB "history" file from the old version...
Is it possible to upgrade to your version of folders2flickr and reuse the history file from the old version? I do not want to upload all the photos again to flickr... Perhaps someone has tried this and give some hints what to do?!?!

Tanks in advance and best regards
Jens

Deleted sets are not recreated, photos were not added to sets if something went wrong

Hello

many thanks for maintaining the "folders2flickr" project... I have used the "originally" folders2flickr for some time now... with some manual fixes... but I think your way is far better...

I have found two issues testing a little bit with your rebuild folders2flickr version (git version with pip version of exifread):

  1. Photo sets which are deleted on flickr are not receated during skript run (like Issue #27 which is actually closed and also related to #18 )
  2. If photos are not added to their sets during script run (due to an error, like loosing internet connection), they are not re-added in a second script run. Only newly added photos are added to sets. This happens also if the set creation fails during run, so all photos uploaded for this set will never be added to a set, unless a new photo appears in the folder.

I think both issues are related to each other... I think there are the following problems:

  • No check if all needed sets exsists in flickr
  • No sets are created if they are missing
  • Ne photos are added to sets, only if they are uploaded in the same script run

Thanks and best regards
Jens

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.