Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

velocityg4

macrumors 604
Original poster
Dec 19, 2004
7,330
4,722
Georgia
I've been trying to import a large Picasa library into Photos and keep the folder structure as albums. I found a nice Apple Script someone made for this. Unfortunately, it has a problem where the Finder will timeout when importing a large folder. Some of the albums are over 2GB. So, it can take the Finder over two minutes.

I don't really have much programming experience. I've tried modifying adding timeout periods to every reference I could find for "tell application "Finder". No luck. It will still timeout after the default 2 minutes.

If there was a better way to maintain albums in Photos from Picasa. I would use it. I've had no luck finding anything. So, I'm stuck trying to make this work more reliably.

I've linked the original. As I don't know if it is allowed to upload a copy of someone else's work I found.

I am using "Version 2". Due to support of sub-folders.
https://discussions.apple.com/docs/DOC-8931
 

superscape

macrumors 6502a
Feb 12, 2008
937
223
East Riding of Yorkshire, UK
Well, I think that's your first challenge! ;-)

Assuming it's not stalling because of an error, and your script just needs a longer time to execute then first step is to figure out which part of the code is timing out. Once you've found it, put an "with timeout..." command around it. If there is already one there then you may need to increase the amount of time allowed.

There's some documentation on how to use it here:

https://developer.apple.com/library...gGuide/reference/ASLR_control_statements.html

...an example of usage might be:

Code:
with timeout of 20 seconds
   //do something that takes a long time
end timeout
 

velocityg4

macrumors 604
Original poster
Dec 19, 2004
7,330
4,722
Georgia
Other errors occurred during the script. Such as Photos hanging because the script would start processing the next batch before it was ready. So, Photos would stop and say it was still importing pictures.

I found an alternative. I could just have iPhoto import everything as it would add each folder as an individual Event. Then I just had Photos create a new library from that iPhoto library. Keeping all the events.

There wasn't anyway I was going to figure out where to insert those timeout statements. I tried it at every mention of Finder. I was hoping it was an easy solution where someone could just say. Add the timeouts to all of these entries. So, that there is no chance for a timeout. No matter where it occurs during the script.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.