Error log and possible timeouts

Hi,

I don’t seem to recall now if EF is logging import errors in a log file or something like that.

After upgrading to 1.5.8 some import script I’m using is sometimes failing and I don’t have any clues why.
The script is importing an URI into EF with some preprocessing. Until now I don’t remember it failing, but
today there were at least 2-3 errors.

Just a thought: what’s happening if EF timeouts when trying to fetch an URI?

tia,

A://

Please see this page.

In some cases it will retry, but eventually it will fail with an error (in the Errors window and the Console log).

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.

This particular error is due to a bug. There’s nothing actually wrong. You can safely ignore it.

How is your script failing?

I have to confess that I haven’t programmed this script defensively so it is only now that I’ll start digging into what’s going on. So far what I know is that the script tries to import and URI (with some added meta) to 3 different systems (EF is the last) and EF has failed a couple of times in the last days (nb: lately I’ve been on a very flaky Internet connection, but the logs don’t show this to be the problem).

If I discover anything relevant to EF I’ll let you know.

Thanks for the help,

A://

As of now I have added logging to my app/script so I’ll be able to figure out what was happening (in the eventuality it happens again). Meanwhile the effort of adding some logging already paid of as it helped me solve two things that were nagging me, but kind of ignored so far.

A://

PS: I went with the new standard levels: fyi, wtf, omg :-).

This is fixed in EagleFiler 1.5.9.