Page 1 of 2
Hazel trying to re-import the same photos over and over

Posted:
Thu Mar 24, 2016 9:08 am
by simonmason
I recently started moving away from Picasa to Photos. I set up a Hazel rule to import photos from my main photo directory on my iMac. I set it up as follows: Date Last Modified is after Date Last Matched, Import into Photos "Album".
The photos directory it is pointing to is updated from my server - a separate process copies new pictures into this folder as they become available.
I am constantly being presented with duplicate photo import messages within Photos so something is not going according to plan.
I did a search of the forum but could only find some older posts related to iPhoto. I am happy to provide further information to help diagnose this. Thanks.
Re: Hazel trying to re-import the same photos over and over

Posted:
Thu Mar 24, 2016 10:26 am
by Mr_Noodle
Go into the "Info" section and click "View Log". See if there are any errors happening while importing and post (or if they are of a sensitive nature, email) them.
Re: Hazel trying to re-import the same photos over and over

Posted:
Fri Mar 25, 2016 4:05 pm
by simonmason
Here you go - repeated errors-not sure what this is? The external drive is mounted and accessible. Thanks.
2016-03-25 14:12:33.036 hazelworker[60929] [Error] Photos import failed: Could not add file /Volumes/The Mason's iMac External Drive/Photo/Current/2016-03-23 to Photos.
2016-03-25 14:12:33.240 hazelworker[60929] Done processing folder Current
2016-03-25 15:10:32.593 hazelworker[61716] ###main load address: 0x10c59a000
2016-03-25 15:10:32.594 hazelworker[61716] ###Noodle load address: 0x10c6b0000
2016-03-25 15:10:32.594 hazelworker[61716] ###CK load address: 0x10c674000
2016-03-25 15:10:32.847 hazelworker[61716] Processing folder Current
2016-03-25 15:10:35.441 hazelworker[61716] 2016-03-22: Rule Import Current Photos matched.
2016-03-25 15:12:59.444 hazelworker[61716] Error importing file /Volumes/The Mason's iMac External Drive/Photo/Current/2016-03-22 into Photos: {
NSLocalizedDescription = "Photos got an error: AppleEvent timed out.";
NSLocalizedFailureReason = "AppleEvent timed out.";
OSAScriptErrorAppAddressKey = "<NSAppleEventDescriptor: [0x0,dc0dc \"Photos\"]>";
OSAScriptErrorAppNameKey = Photos;
OSAScriptErrorBriefMessageKey = "AppleEvent timed out.";
OSAScriptErrorMessageKey = "Photos got an error: AppleEvent timed out.";
OSAScriptErrorNumberKey = "-1712";
OSAScriptErrorRangeKey = "NSRange: {1014, 29}";
}
2016-03-25 15:12:59.444 hazelworker[61716] [Error] Photos import failed: Could not add file /Volumes/The Mason's iMac External Drive/Photo/Current/2016-03-22 to Photos.
2016-03-25 15:12:59.448 hazelworker[61716] 2016-03-23: Rule Import Current Photos matched.
2016-03-25 15:14:59.580 hazelworker[61716] Error importing file /Volumes/The Mason's iMac External Drive/Photo/Current/2016-03-23 into Photos: {
NSLocalizedDescription = "Photos got an error: AppleEvent timed out.";
NSLocalizedFailureReason = "AppleEvent timed out.";
OSAScriptErrorAppAddressKey = "<NSAppleEventDescriptor: [0x0,dc0dc \"Photos\"]>";
OSAScriptErrorAppNameKey = Photos;
OSAScriptErrorBriefMessageKey = "AppleEvent timed out.";
OSAScriptErrorMessageKey = "Photos got an error: AppleEvent timed out.";
OSAScriptErrorNumberKey = "-1712";
OSAScriptErrorRangeKey = "NSRange: {1014, 29}";
Re: Hazel trying to re-import the same photos over and over

Posted:
Fri Mar 25, 2016 4:10 pm
by Mr_Noodle
That indicates that Photos is being unresponsive. Maybe it is succeeding in importing the photos but it is neglecting to respond to Hazel in a timely manner. From Hazel's POV, the operation failed so it has to try again. Is your Photos library quite large? Is it running at the time or does Hazel have to launch it every time it does the import?
Re: Hazel trying to re-import the same photos over and over

Posted:
Fri Mar 25, 2016 4:35 pm
by simonmason
It is large - about 55,000 photos spread across a lot of albums.
Re: Hazel trying to re-import the same photos over and over

Posted:
Sat Mar 26, 2016 3:49 pm
by simonmason
Assuming my large photo library is the source of this issue - is it possible to extend the amount of time Hazel works until it gets an acknowledgement to prevent this from happening? Thanks.
Re: Hazel trying to re-import the same photos over and over

Posted:
Mon Mar 28, 2016 11:57 am
by Mr_Noodle
It might be but first off we need to determine that's the case, and not that Photos is just not being responsive. One thing to try is to watch Photos while Hazel is importing. See how quickly the photo gets added. If you see the photo show up but Hazel is still timing out, it may well be a bug in Photos.
Re: Hazel trying to re-import the same photos over and over

Posted:
Wed Mar 30, 2016 8:01 am
by simonmason
I haven't seen the issue since. It seems that individual updates are working fine now. It might have been the initial load that was causing the issue.
Re: Hazel trying to re-import the same photos over and over

Posted:
Mon May 09, 2016 7:04 am
by simonmason
It has continued to happen. I can't figure out what is going on right now. I run Hazel on two computers that are connected to my network. They both have local copies of my main network photo directory and are kept in sync through a sync program that copies any new files from the network to the local copy. Once this happens, Hazel then imports the photos into Photos. However, when this happens, I end up with what appears to be multiple attempts to add these pictures. Generally these sync routines run overnight so it is in the morning that I see the repeated duplicate import messages in Photos.
I clicked on the view button in Hazel to see the rules matched by folder and the folders in question all show "Could not add file <directory name> to Photos"
What is strange is that the failing directories are not recent photos. All of the recently updated photo directories are importing just fine.
Any thoughts? Thanks.
Re: Hazel trying to re-import the same photos over and over

Posted:
Mon May 09, 2016 10:40 am
by Mr_Noodle
Check the logs and post/email the errors as there is likely to be more info there.
Re: Hazel trying to re-import the same photos over and over

Posted:
Mon May 09, 2016 9:10 pm
by simonmason
Here is a snippet from the log. It looks like it is timing out but I am not sure why?
2016-05-09 06:47:24.270 hazelworker[13371] [Error] Photos import failed: Could not add file /Volumes/SD/Photos/Current/2016-03-17 to Photos.
2016-05-09 06:47:24.272 hazelworker[13371] 2016-03-18: Rule Update Photos matched.
2016-05-09 06:48:14.218 hazelworker[13490] ###main load address: 0x102624000
2016-05-09 06:48:14.229 hazelworker[13490] ###Noodle load address: 0x102734000
2016-05-09 06:48:14.229 hazelworker[13490] ###CK load address: 0x1026f5000
2016-05-09 06:48:14.277 hazelworker[13490] Processing folder Downloads
2016-05-09 06:48:16.340 hazelworker[13490] Done processing folder Downloads
2016-05-09 06:48:17.324 hazelworker[13491] ###main load address: 0x1060dd000
2016-05-09 06:48:17.325 hazelworker[13491] ###Noodle load address: 0x1061eb000
2016-05-09 06:48:17.325 hazelworker[13491] ###CK load address: 0x1061ae000
2016-05-09 06:48:17.351 hazelworker[13491] Processing folder Downloads
2016-05-09 06:48:19.368 hazelworker[13491] Done processing folder Downloads
2016-05-09 06:49:24.390 hazelworker[13371] Error importing file /Volumes/SD/Photos/Current/2016-03-18 into Photos: {
NSLocalizedDescription = "Photos got an error: AppleEvent timed out.";
NSLocalizedFailureReason = "AppleEvent timed out.";
OSAScriptErrorAppAddressKey = "<NSAppleEventDescriptor: [0x0,51051 \"Photos\"]>";
OSAScriptErrorAppNameKey = Photos;
OSAScriptErrorBriefMessageKey = "AppleEvent timed out.";
OSAScriptErrorMessageKey = "Photos got an error: AppleEvent timed out.";
OSAScriptErrorNumberKey = "-1712";
OSAScriptErrorRangeKey = "NSRange: {1014, 29}";
}
2016-05-09 06:49:24.391 hazelworker[13371] [Error] Photos import failed: Could not add file /Volumes/SD/Photos/Current/2016-03-18 to Photos.
2016-05-09 06:49:24.396 hazelworker[13371] 2016-03-20: Rule Update Photos matched.
2016-05-09 06:51:14.645 hazelworker[13371] 2016-04-26: Rule Update Photos matched.
2016-05-09 06:51:16.025 hazelworker[13371] 2016-05-08: Rule Update Photos matched.
2016-05-09 06:51:16.803 hazelworker[13371] Done processing folder Current
2016-05-09 07:00:34.443 hazelworker[13667] ###main load address: 0x103bbd000
2016-05-09 07:00:34.456 hazelworker[13667] ###Noodle load address: 0x103cca000
2016-05-09 07:00:34.456 hazelworker[13667] ###CK load address: 0x103c91000
2016-05-09 07:00:34.509 hazelworker[13667] Processing folder Current
2016-05-09 07:00:36.671 hazelworker[13667] 2016-01-17: Rule Update Photos matched.
2016-05-09 07:00:49.437 hazelworker[13672] ###main load address: 0x108c6d000
2016-05-09 07:00:49.444 hazelworker[13672] ###Noodle load address: 0x108d7e000
2016-05-09 07:00:49.444 hazelworker[13672] ###CK load address: 0x108d41000
2016-05-09 07:00:49.486 hazelworker[13672] Processing folder Downloads
2016-05-09 07:00:51.562 hazelworker[13672] Done processing folder Downloads
2016-05-09 07:01:04.588 hazelworker[13680] ###main load address: 0x109619000
2016-05-09 07:01:04.605 hazelworker[13680] ###Noodle load address: 0x109725000
2016-05-09 07:01:04.605 hazelworker[13680] ###CK load address: 0x1096e9000
2016-05-09 07:01:04.625 hazelworker[13680] Processing folder Trash
2016-05-09 07:01:05.786 hazelworker[13680] Done processing folder Trash
2016-05-09 07:02:39.384 hazelworker[13667] Error importing file /Volumes/SD/Photos/Current/2016-01-17 into Photos: {
NSLocalizedDescription = "Photos got an error: AppleEvent timed out.";
NSLocalizedFailureReason = "AppleEvent timed out.";
OSAScriptErrorAppAddressKey = "<NSAppleEventDescriptor: [0x0,51051 \"Photos\"]>";
OSAScriptErrorAppNameKey = Photos;
OSAScriptErrorBriefMessageKey = "AppleEvent timed out.";
OSAScriptErrorMessageKey = "Photos got an error: AppleEvent timed out.";
OSAScriptErrorNumberKey = "-1712";
OSAScriptErrorRangeKey = "NSRange: {1014, 29}";
}
2016-05-09 07:02:39.390 hazelworker[13667] [Error] Photos import failed: Could not add file /Volumes/SD/Photos/Current/2016-01-17 to Photos.
2016-05-09 07:02:39.416 hazelworker[13667] 2016-03-17: Rule Update Photos matched.
2016-05-09 07:03:09.967 hazelworker[13667] 2016-03-18: Rule Update Photos matched.
2016-05-09 07:03:11.203 hazelworker[13667] Done processing folder Current
2016-05-09 08:02:37.093 hazelworker[14707] ###main load address: 0x1075a5000
2016-05-09 08:02:37.113 hazelworker[14707] ###Noodle load address: 0x1076ae000
2016-05-09 08:02:37.113 hazelworker[14707] ###CK load address: 0x107676000
2016-05-09 08:02:37.229 hazelworker[14707] Processing folder Current
2016-05-09 08:02:39.484 hazelworker[14707] 2016-01-17: Rule Update Photos matched.
2016-05-09 08:04:44.661 hazelworker[14707] Error importing file /Volumes/SD/Photos/Current/2016-01-17 into Photos: {
NSLocalizedDescription = "Photos got an error: AppleEvent timed out.";
NSLocalizedFailureReason = "AppleEvent timed out.";
OSAScriptErrorAppAddressKey = "<NSAppleEventDescriptor: [0x0,51051 \"Photos\"]>";
OSAScriptErrorAppNameKey = Photos;
OSAScriptErrorBriefMessageKey = "AppleEvent timed out.";
OSAScriptErrorMessageKey = "Photos got an error: AppleEvent timed out.";
OSAScriptErrorNumberKey = "-1712";
OSAScriptErrorRangeKey = "NSRange: {1014, 29}";
}
2016-05-09 08:04:44.661 hazelworker[14707] [Error] Photos import failed: Could not add file /Volumes/SD/Photos/Current/2016-01-17 to Photos.
Re: Hazel trying to re-import the same photos over and over

Posted:
Tue May 10, 2016 9:23 am
by Mr_Noodle
Photos is timing out sending a response. Do you have a large library or is Photos being used at the time?
Re: Hazel trying to re-import the same photos over and over

Posted:
Tue May 10, 2016 9:32 pm
by simonmason
The library has 4239 pictures. As far as I can tell it keeps trying to add the pictures and the duplicate photo dialog comes up, and then nothing else can happen and it keeps trying over and over.
Mr_Noodle wrote:Photos is timing out sending a response. Do you have a large library or is Photos being used at the time?
Re: Hazel trying to re-import the same photos over and over

Posted:
Wed May 11, 2016 10:45 am
by Mr_Noodle
As mentioned, it is timing out. From Hazel's POV, Photos is not responding and therefore the operation is not succeeding so it has to try again.
Unfortunately, Photos is really flakey so you'll have to experiment. Like try having Photos running when Hazel does the import (or not - again, you have to play with it). If you are importing a lot of photos at once, you can try inserting an artificial pause. You can do that with a shellscript like:
sleep 5
where 5 is the number of seconds to wait.
Also, if you have Hazel importing into a specific album, you can instead change that to import into the library instead.
In the end, though, Photos needs a lot of fixing. I really don't consider it ready for primetime in a lot of ways.
Re: Hazel trying to re-import the same photos over and over

Posted:
Fri May 13, 2016 9:05 am
by simonmason
Probably time to switch back to Picasa. This is definitely more trouble than it is worth.