Thanks. I couldn’t find any time out errors in the logs, but only a couple of errors related to tagging some missing notes – which is somehow weird.
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: jobs.pyc:2134 Error setting OpenMeta tags on note: <NSError Domain=NSPOSIXErrorDomain Code=2 UserInfo={
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: MJTCodeString = "setxattr(path, [key UTF8String], [data bytes], [data length], position, options)";
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: MJTFailingKey = "com.apple.metadata:kOMUserTags";
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: MJTFile = "/Users/mjt/Documents/Programming/MJTFoundation/Source/NSURL+MJTXattr.m";
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: MJTFunction = "-[NSURL(MJTXattr) mjtSetXattrData:forKey:error:]";
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: MJTLine = 47;
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: MJTStackFrames = (
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: "-[NSURL(MJTOpenMeta) mjtSetOpenMetaTags:error:] (107)",
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: "-[NSURL(MJTXattr) mjtSetXattrData:forKey:error:] (50)"
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: );
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: NSDetailedErrors = (
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed. No such file or directory\" UserInfo=0x8edb740 {MJTFile=/Users/mjt/Documents/Programming/MJTFoundation/Source/NSURL+MJTXattr.m, MJTStackFrames=(
\"-[NSURL(MJTXattr) mjtSetXattrData:forKey:error:] (50)\"
), MJTFailingKey=org.openmetainfo:kOMUserTags, MJTFunction=-[NSURL(MJTXattr) mjtSetXattrData:forKey:error:], NSFilePath=/Users/alex/Dropbox/nvAlt/knowledgearchive/knarc/Notes/2.rtfd, MJTCodeString=setxattr(path, [key UTF8String], [data bytes], [data length], position, options), MJTLine=47}",
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed. No such file or directory\" UserInfo=0x8edbd50 {MJTFile=/Users/mjt/Documents/Programming/MJTFoundation/Source/NSURL+MJTXattr.m, MJTStackFrames=(
\"-[NSURL(MJTXattr) mjtSetXattrData:forKey:error:] (50)\"
), MJTFailingKey=com.apple.metadata:kMDItemOMUserTags, MJTFunction=-[NSURL(MJTXattr) mjtSetXattrData:forKey:error:], NSFilePath=/Users/alex/Dropbox/nvAlt/knowledgearchive/knarc/Notes/2.rtfd, MJTCodeString=setxattr(path, [key UTF8String], [data bytes], [data length], position, options), MJTLine=47}"
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: );
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: NSFilePath = "/Users/alex/Dropbox/nvAlt/knowledgearchive/knarc/Notes/2.rtfd";
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: NSLocalizedDescription = "The operation couldn\U2019t be completed. No such file or directory";
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: NSLocalizedFailureReason = "No such file or directory";
1/27/12 12:06:10.444 PM [0x0-0x1b01b].com.c-command.EagleFiler: }>
Here is the code I’m using in the script:
tell application "EagleFiler"
repeat until (exists browser window 1)
delay 1
end repeat
set _library to first library document
tell _library
if doctype is "pdf" then
set {_record} to import URLs {fdocuri} tag names _alltags Web page format PDF format note _note source URL docuri
else if doctype is "webarchive" then
set {_record} to import URLs {fdocuri} tag names _alltags Web page format Web archive format note _note source URL docuri
else if doctype is "bookmark" then
set {_record} to import URLs {fdocuri} tag names _alltags Web page format bookmark format note _note source URL docuri
else if doctype is "file" then
set {_record} to import files {fdocuri} tag names _alltags note _note
else if doctype is "quote" then
if doctitle is "" then
set _body to docnote & return & return & tab & tab & "-- <" & docuri & ">"
else
set _body to docnote & return & return & tab & tab & "-- " & doctitle & "](" & docuri & ")"
end if
set {_record} to import plain text _body tag names _alltags source URL docuri
if doctitle is not "" then
set basename of _record to doctitle
end if
else
return missing value
end if
set _ffilename to (my dateString() & "-" & (basename of _record))
if doctitle is "" then
set doctitle to title of _record
end if
set basename of _record to _ffilename
set title of _record to doctitle
-- display dialog "EagleFilter entry of type: " & doctype
return {(id of _record), (URL of _record), (title of _record), (filename of _record)}
end tell
end tell
I cannot think of anything wrong with this code that could lead to the error above so maybe this one was triggered by other event.