Migrating from Flickr to Picasaweb

First off.. if you have a digital camera and you are only storring your precious pictures on your computer, you need to get online quickly and make use of one of the many picture sharing sites, this is where the “cloud” really can have an impact, as your pictures will be storred on literally hundreds of separate computeres professionally managed, safe from fire, theft and dropping your macbook down the stairs!

You could of course use Facebook which actually has very good controls as to who you allow to see your photos, although as we are all aware these change frequently so there is a danger you may end up as the face of a protesting blogger.

I’ve been a happy user of Flickr professional for many years, and I still really like the service, however over the last month or so I’ve come to the conclusion that I want to move my digital memories to Picasaweb. It turns out that this is not a simple process and moving 1500 pictures could be very time consuming, because while there are many tools to bulk upload your images there are done to do the reverse and download them, but fortunately for the geek both systems have api’s, that with some effort, can make the migration of your pictures a viable proposition.

The key component to the migration was a python script I found developed by Nathan Van Gheem last year, which used both services api’s to migrate not just pictures but albums and much of their metadata between the services.

So here we go, these instructions are for  mac users who are in the lucky position of having python installed by default, but for windows are pretty similar are you have installed Python.

From a terminal window, install the two photo service api’s and the threadpool packages for Python

easy_install-2.6 gdata
easy_install-2.6 flickrapi
easy_install-2.6 threadpool

 

To use the python script you will need to authenticate against each of the services to access your pictures, for picassaweb this is your username and password, for Flickr because you are using in effect an external application to access your pictures you will  need a Flickr API Key and secret.

From your Flickr account go the App Garden and apply for your own non-commercial API key. You need to provide a few details, but will end up with the api key  string and a separate secret key string, something like..

Key: e97df11b147f9c46c2ec002b29f479df
Secret: 8fe34c331abbce32

 

Now you have all you need..

Remember to make your downloaded script executable

chmod +x migrate-flickr-to-picasa-nokey.py 

 

And run it

migrate-flickr-to-picasa-nokey.py

 

You should be asked to enter firstly your picassweb details, then your flick api key and secret, you should then be taken to a flickr webpage to confirm you want the script to have access to your pictures.

This script will move all the photos and sets from flickr over to picasa.    
That will require getting authentication information from both services...    

Authenticating with Picasa...
Picasa Username(complete email):edparsons@gmail.com
Picasa Password:
Authenticating with Flickr..
Flickr API Key:e97df11b147f9c46c2ec002b29f479df
Flickr API Secret:8fe34c331abbce32
Press ENTER after you authorized this program

 

Confirm that it’s ok, go back to the terminal window and press enter for the script to continue.

The process will take some time, so go grab a coffee and look forward to seeing your pictures in picasweb !

Written and submitted from the Windsor Hotel Taichung, Taiwan (24.179N, 120.623E)

32 comments

  1. le_affan

    Hej,
    thank you for the informative post and the helpful hints. As a flickr user who is also pondering a change I’d kindly like to ask why you’ve decided to move from Flickr to Picasa?
    Cheers,
    le_affan

    • Ed

      For me there were two issues really, firstly I like using the Picasa application and it’s integration with picasaweb is nice, and the other reason less concrete is that I’m unsure about the long term viability of Flickr, look what happened to del.icio.us

  2. jrom

    Hi Ed,
    Thanks for this hint. Just a little typo in the explanation : you chmod “migrate-flickr-to-picasa-nokey.py” but the line after you run “flickr-to-picasa-nokey.py”

  3. Eric Wolf

    I’ve been pondering the same problem. The one thing that PicasaWeb lacks is the awesome social environment of Flickr. But I haven’t been as active there lately. So it’s sort of a wash. Moving everything to PicasaWeb would mean I could stop paying for Flickr Pro. The same money spent with Google would give me quite a bit of storage.

  4. swhui

    Whilst I agree that the use of Flickr and Picasaweb are great for showing and sharing photos with friends and family, I am however concerned with using them as your single mechanism of cloud storage and backup. Even though as Ed mentioned “your pictures will be storred on literally hundreds of separate computeres professionally managed, safe from fire, theft and dropping your macbook down the stairs!” there is nothing stopping them (Flicker and Picasaweb) from just deleting your photos or even your account. Just ask Shéhérazade.

    • Ed

      @swhui, of course this is an element of risk whenever you intrust anything with a third party, although I would still argue that cloud storage is on balance more secure than most peoples personal facilities. The comprehensive solution of course is to back up using at least two geographical locations and two different media types. Cloud based systems like picasaweb or flickr can only be part of the solution.

  5. Tim Warr

    And now we know why you wanted to migrate to Picasaweb ;-)

    Actually I think richer photo sharing may be one of the main uses of Google+ (particularly among non-geeks). I can see it attracting those who have previously been facebook skeptics.

  6. Steve

    The Python application crashed with this error (below). I thought it might have been because I had a stale API key so I had Flickr generate another set. Same problem. After authorizing on Flickr I get:


    Press ENTER after you authorized this program
    Traceback (most recent call last):
    File “./migrate-flickr-to-picasa-nokey.py”, line 335, in
    do_migration()
    File “./migrate-flickr-to-picasa-nokey.py”, line 157, in do_migration
    token = flickr_token.value # force retrieval of authentication information…
    File “./migrate-flickr-to-picasa-nokey.py”, line 108, in value
    self._value = self.input_retriever(self)
    File “./migrate-flickr-to-picasa-nokey.py”, line 135, in flickr_token_retriever
    flickr_usernsid = FLICKR.auth_checkToken(auth_token=token).find(‘auth’).find(‘user’).get(‘nsid’)
    File “/Library/Python/2.6/site-packages/flickrapi-1.4.2-py2.6.egg/flickrapi/__init__.py”, line 349, in handler
    File “/Library/Python/2.6/site-packages/flickrapi-1.4.2-py2.6.egg/flickrapi/__init__.py”, line 435, in __wrap_in_parser
    File “/Library/Python/2.6/site-packages/flickrapi-1.4.2-py2.6.egg/flickrapi/__init__.py”, line 278, in parse_etree
    flickrapi.exceptions.FlickrError: Error: 98: Invalid auth token

  7. Steve

    Never mind. I found the problem: Python’s tab sensitivity. I loaded it in a programming editor to check the code and saved it from there. Running the virgin script works.

  8. Jack

    Hey Ed, thanks for the script. I’m having an error, I was hoping you could help out? I have a google apps account that I log into picasa with, not sure if that causes the error. I tried the stock version of the script, as well as a modified version (based on Morgan’s comment above).

    Any help would be much appreciated :)

    Found 34 sets to move over to Picasa.
    Moving “XXXXXXX” set over to a picasa album. 1/34
    Gathering set “XXXXXXX” information.
    Found 11 photos and videos in the XXXXXXX flickr set.
    /Library/Python/2.6/site-packages/gdata-2.0.14-py2.6.egg/gdata/photos/service.py:110: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
    Traceback (most recent call last):
    File “/Users/jack/migrate-flickr-to-picasa-nokey.py”, line 335, in
    do_migration()
    File “/Users/jack/migrate-flickr-to-picasa-nokey.py”, line 295, in do_migration
    picasa_albums = get_picasa_albums(set_title, aset, len(all_photos))
    File “/Users/jack/migrate-flickr-to-picasa-nokey.py”, line 185, in get_picasa_albums
    picasa_album = gd_client.InsertAlbum(title=id, summary=aset.find(‘description’).text, access=’protected’)
    File “build/bdist.macosx-10.6-universal/egg/gdata/photos/service.py”, line 358, in InsertAlbum
    gdata.photos.service.GooglePhotosException: (403, ‘Forbidden’, ‘Not authorized to modify this resource.’)

  9. Dennis J

    I’m a bit of a novice when it comes to coding so I’m clearly attempting to swim in water way above my head but migrating from Flickr to Picasa (w/o losing all the metadata) is something I’ve wanted to do for a very long time. I think I can figure out the scripts for python once I’m in the terminal window but I don’t quite understand how to install the gdata API or the Flickr API prior to running the above script.

    Can anyone in this forum give me a few tips or point me to a place I can find some more in depth directions for a newbie like me? Thanks

  10. Ed

    Dennis,

    You should just be able to type “easy_install-2.6 gdata” and “easy_install-2.6 flickrapi” at the terminal window prompt to install the necessary libraries.

  11. chuckles92104

    Dennis, I’m a total noob when it comes to scripting/Terminal. Thus far I’ve done this:

    Downloaded the migrate-flickr-to-picasa-nokey.py script (it’s in my downloads folder and in the same folder as Terminal),
    Successfully loaded python (3.2.1),
    Successfully loaded gdata (2.0.14),
    Successfully loaded flickrapi (1.4.2),
    Successfully loaded threadpool (1.2.7).

    In Terminal, when I try to input chmod +x migrate-flickr-to-picasa-nokey.py I get this (No such file or directory):

    Chucks-MBP:~ chuck$ chmod +x migrate-flickr-to-picasa-nokey.py
    chmod: migrate-flickr-to-picasa-nokey.py: No such file or directory

    Then, thinking I didn’t have to do the chmod thing, I input just migrate-flickr-to-picasa-nokey.py and got this (command not found):

    Chucks-MBP:~ chuck$ migrate-flickr-to-picasa-nokey.py
    -bash: migrate-flickr-to-picasa-nokey.py: command not found

    What am I doing wrong here (besides swimming in very deep water)? Am I doing anything right? ;-)

    TIA, Chuck

  12. Jason Tucker

    Foir those of you having issues, it may be because you have Python 2.7 installed.

    Try running these instead:

    easy_install-2.7 gdata
    easy_install-2.7 flickrapi
    easy_install-2.7 threadpool

    -Jason

  13. Rachel

    Hi Ed,

    I’m having the same problem as Chuck. I’ve already installed the three packages and received my Flickr keys, but now I’m unable to get past the “chmod +x migrate-flickr-to-picasa-nokey.py ” step.

    Rachels-MBP:~ rachelmayo$ chmod +x migrate-flickr-to-picasa-nokey.py
    chmod: migrate-flickr-to-picasa-nokey.py: No such file or directory

    I also tried (without success):
    Rachels-MBP:~ rachelmayo$ chmod +x ~/Users/rachelmayo/Desktop/migrate-flickr-to-picasa-nokey.py

    Any help would be greatly appreciated! :)

    -Rachel

  14. Flickr_Hater

    How did you install threadpool? I did download it, but when I run python threadpool to install it, I get the following message.

    Traceback (most recent call last):
    File “setup.py”, line 3, in
    from setuptools import setup
    ImportError: No module named setuptools

  15. Rachel

    I figured out what my issue was! Instead of:

    chmod +x migrate-flickr-to-picasa-nokey.py

    I needed to simply move the .py file to my Downloads folder and type:

    chmod +x ~/Downloads/migrate-flickr-to-picasa-nokey.py

    After inputting my Picasa/Google login info and my Flickr API keys to terminal, the script is finally working. Thanks again for this script! :)

  16. Pingback: Flickr v. Picasa « heyitsRachel’s Blog!
  17. arai

    Hi Ed,

    Downloaded and installed python 2.7.2 but failed to installed the rest of the components gdata, flickrapi, threadpool.

    Opened up a python shell:

    Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32

    >>> easy_install-2.7 gdata
    SyntaxError: invalid syntax

    >>> easy_install-2.7 flickrapi
    SyntaxError: invalid syntax

    Do i need to install easy_install ? and then hunt each of those components down separately or are they already included in the python package? I’m able to find “threadpool-1.2.7-py2.6.egg” which does nothing when it was executed. A bit lost here.

  18. Chris

    For those getting “Invalid Auth Token”, I believe there is a delay between creating your key and actually being able to use that key to access the API. For me, it was a few minutes. YMMV.

  19. Pingback: Section 4: Photos | SocioloG+
  20. henri

    Hi all thanks for this scripts

    I have this error any idea?


    2012-02-14 23:16:42.019 osascript[90417:e07] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:
    /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper
    osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.
    0:193: execution error: An error of type -10810 has occurred. (-10810)
    Press ENTER after you authorized this program
    Traceback (most recent call last):
    File "/Users/henri/Downloads/migrate-flickr-to-picasa-nokey.py", line 335, in
    do_migration()
    File "/Users/henri/Downloads/migrate-flickr-to-picasa-nokey.py", line 157, in do_migration
    token = flickr_token.value # force retrieval of authentication information...
    File "/Users/henri/Downloads/migrate-flickr-to-picasa-nokey.py", line 108, in value
    self._value = self.input_retriever(self)
    File "/Users/henri/Downloads/migrate-flickr-to-picasa-nokey.py", line 133, in flickr_token_retriever
    FLICKR.get_token_part_two((token, frob))
    File "build/bdist.macosx-10.7-intel/egg/flickrapi/__init__.py", line 767, in get_token_part_two
    File "build/bdist.macosx-10.7-intel/egg/flickrapi/__init__.py", line 775, in get_token
    File "build/bdist.macosx-10.7-intel/egg/flickrapi/__init__.py", line 349, in handler
    File "build/bdist.macosx-10.7-intel/egg/flickrapi/__init__.py", line 435, in __wrap_in_parser
    File "build/bdist.macosx-10.7-intel/egg/flickrapi/__init__.py", line 257, in parse_xmlnode
    flickrapi.exceptions.FlickrError: Error: 108: Invalid frob

  21. Ta

    The script worked perfectly for some 7 albums I had, but it didn’t work for the 150+ other albums. The problem? Picasa only allows photo names 100 characters or less in length. Is there a way around this besides manually changing the names of all my photos?

  22. Ta

    Sorry if I’m posting this twice…

    My Flickr photo names are way too long for Picasa (which has a 100 character limit). Is there a way to modify the script to automatically shorten names? I have thousands of photos and it’s really difficult to do that manually (even with Aperture’s sync to Flickr, which takes forever to download the photos so I can batch edit them).

    Thanks!

  23. efoto

    Hi, thank you for the script!

    Any ideas on what went wrong?

    Found 3 sets to move over to Picasa.
    Moving “xxxxx” set over to a picasa album. 1/3
    Gathering set “xxxxx” information.
    Traceback (most recent call last):
    File “./migrate-flickr-to-picasa-nokey.py”, line 335, in
    do_migration()
    File “./migrate-flickr-to-picasa-nokey.py”, line 288, in do_migration
    media=’all’
    File “/Library/Python/2.6/site-packages/flickrapi-1.4.2-py2.6.egg/flickrapi/__init__.py”, line 349, in handler
    File “/Library/Python/2.6/site-packages/flickrapi-1.4.2-py2.6.egg/flickrapi/__init__.py”, line 435, in __wrap_in_parser
    File “/Library/Python/2.6/site-packages/flickrapi-1.4.2-py2.6.egg/flickrapi/__init__.py”, line 278, in parse_etree
    flickrapi.exceptions.FlickrError: Error: 1: Photoset not found

  24. Liz

    Hi Ed,
    Thanks for posting this. Everything seems to be working well, except that none of my photo labels are being transferred. They are well under picasa’s 100 character limit. Any ideas?

  25. Foton

    Hi,

    How does the migration work? Does the python script download the photos from Flickr first to your machine then uploads them to Picasa Web, or is that a direct transfer between Flickr and Picasa Web?

    I assume it’s the latter–otherwise, I could just upload the photos from my local NAS–but I want to verify this first before trying out the script.

    Thanks, Foton

  26. Parrhesiastes

    Miracle script, now that’s the way it should be. Thanks for sharing it.

    Any idea how easy it is to update it so to set the migrated photos resolution to max 2048? (since all images under 2048 on long edge are not counted toward free storage limit on Picasa!)

    Thanks again,

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>