Console: Date extraction failed


When helping in this topic I noticed something strange in my console.

I was just wondering if anyone of you when running the code below sees similar messages in the console:

set timeSlot to "15:24:17 - 16:24:17"

console messages

[code]Date extraction failed: could not parse type = TimeDuration, range = 1/19, matched string = “15:24:17 - 16:24:17”, value = 15:24:17 - 16:24:17
Subresults = {

Date extraction failed: could not parse type = Timestamp, range = 1/19, matched string = “15:24:17 - 16:24:17”, value = 15:24:17 - 16:24:17
Subresults = {
(TimeDuration:15:24:17 - 16:24:17)
The weird thing is that in Yosemite the logging seems to be more excessive than in Mavericks, the logging starts when typing and compiling while in Mavericks it only logs when running. Is anyone familiar with this? Is there some kind of formatter applied when a string is set in AppleScript-editor? Another weird thing is that It doesn’t happen when the seconds of the times are both zero.

For the record: it’s an Script Editor message, not an AppleScript error or something.

I’m just curious :slight_smile:


same behavior here (10.10.3) but only in Script Editor, not in Script Debugger


I’m very curious why some kind of formatter is applied in SE apart from standard AppleScript.

My guess is it’s an automatic NSDataDetector kicking in in the Log pane, and not being able to successfully parse the string as a time range. The range reported in the message matches the date string’s offset in that pane, allowing for the initial “Result:” – that can’t be a coincidence.

That was my guess too, also because message 1 of 2 is parsing both times (BeginTime and EndTime) correctly. Why would something like that kick in?

Select type in the log pane and go to Edit → Substitutions → Data Detectors. It seems to be on by default; turn it off and the messages disappear. Unfortunately it doesn’t seem to be stored when you use Save as Default.

Thanks Shane!

It’s more curiosity than bug, I suppose, but it’s probably still worth logging a bug for. All that stuff should be disabled for the log pane.