Bug Problems with hazelOutputAttributes Hazel 3.3.2?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

OSX: 10.10
Hazel 3.3.2 (1215)

Seems that Hazel have problems with hazelOutputAttributes and inputAttributes. Is like these variables become very weak and unstable if touch anything. The next rules works fine but suddenly they stop work without any apparent reason.

Please right click in every image -> view in new tab to see images correctly. This forum crop all images in square

Image

Image

Image

Image

log

Code: Select all
 Marcador - 4/11/2014 11:50:25
2014-11-04 11:50:30.098 HazelHelper[26283] DEBUG: Thread 0x7f8871d29610: Run worker for folder: /Users/edenexposito/Desktop/Trabajando con atributos
2014-11-04 11:50:30.352 hazelworker[53113] ###main load address: 0x10c74d000
2014-11-04 11:50:30.353 hazelworker[53113] ###Noodle load address: 0x10c85d000
2014-11-04 11:50:30.353 hazelworker[53113] ###CK load address: 0x10c822000
2014-11-04 11:50:30.718 hazelworker[53113] DEBUG: Program is licensed.
2014-11-04 11:50:31.185 hazelworker[53113] DEBUG: Unexpected type for Mail download URL: (null)
2014-11-04 11:50:31.192 hazelworker[53113] DEBUG: Could not find entry for default_directory in Chrome preference file.
2014-11-04 11:50:31.454 hazelworker[53113] Processing folder Trabajando con atributos (forced)
2014-11-04 11:50:31.454 hazelworker[53113] DEBUG: Initialized
2014-11-04 11:50:31.454 hazelworker[53113] DEBUG: Pausing to wait for things to settle down.
2014-11-04 11:50:33.552 hazelworker[53113] DEBUG: Processing directories: (
    "/Users/edenexposito/Desktop/Trabajando con atributos"
)
2014-11-04 11:50:33.605 HazelHelper[26283] DEBUG: Checking events for path /Users/edenexposito/Desktop/Trabajando con atributos, folder <ComNoodlesoft_HazelConcreteFolder: 0x7f887312ab00> "Trabajando con atributos"
2014-11-04 11:50:33.606 hazelworker[53113] DEBUG: Received file event: {
    date = "2014-11-04 10:50:30 +0000";
    path = "<ComNoodlesoft_NoodlePathSet: 0x7ffdf3504fb0> - (\n    \"/Users/edenexposito/Desktop/Trabajando con atributos\"\n)";
}
2014-11-04 11:50:33.606 hazelworker[53113] DEBUG: About to process directory /Users/edenexposito/Desktop/Trabajando con atributos
2014-11-04 11:50:33.810 hazelworker[53113] DEBUG: .DS_Store: File is hidden/invisible. Skipping.
2014-11-04 11:50:33.944 hazelworker[53113] Unrecognized keys in record returned from condition AppleScript: (
    hazelOutputAttributes
)
 


Last log line "Unrecognized keys in record returned from condition AppleScript: (hazelOutputAttributes)" is strange, i think that all are well writed. In fact minutes ago all works perfectly... very strange.

Edit: Other log fragment

Code: Select all
2014-11-04 14:48:29.123 HazelHelper[26283] DEBUG: Thread 0x7f8871d29610: Run worker for folder: /Users/edenexposito/Desktop/Trabajando con atributos
2014-11-04 14:48:29.150 hazelworker[59335] ###main load address: 0x10487b000
2014-11-04 14:48:29.151 hazelworker[59335] ###Noodle load address: 0x10498c000
2014-11-04 14:48:29.151 hazelworker[59335] ###CK load address: 0x104950000
2014-11-04 14:48:29.161 hazelworker[59335] DEBUG: Program is licensed.
2014-11-04 14:48:29.169 hazelworker[59335] DEBUG: Unexpected type for Mail download URL: (null)
2014-11-04 14:48:29.176 hazelworker[59335] DEBUG: Could not find entry for default_directory in Chrome preference file.
2014-11-04 14:48:29.182 hazelworker[59335] Processing folder Trabajando con atributos (forced)
2014-11-04 14:48:29.182 hazelworker[59335] DEBUG: Initialized
2014-11-04 14:48:29.182 hazelworker[59335] DEBUG: Pausing to wait for things to settle down.
2014-11-04 14:48:31.278 hazelworker[59335] DEBUG: Processing directories: (
    "/Users/edenexposito/Desktop/Trabajando con atributos"
)
2014-11-04 14:48:31.279 HazelHelper[26283] DEBUG: Checking events for path /Users/edenexposito/Desktop/Trabajando con atributos, folder <ComNoodlesoft_HazelConcreteFolder: 0x7f8873409830> "Trabajando con atributos"
2014-11-04 14:48:31.280 hazelworker[59335] DEBUG: Received file event: {
    date = "2014-11-04 13:48:29 +0000";
    path = "<ComNoodlesoft_NoodlePathSet: 0x7f8379431470> - (\n    \"/Users/edenexposito/Desktop/Trabajando con atributos\"\n)";
}
2014-11-04 14:48:31.280 hazelworker[59335] DEBUG: About to process directory /Users/edenexposito/Desktop/Trabajando con atributos
2014-11-04 14:48:31.281 hazelworker[59335] DEBUG: .DS_Store: File is hidden/invisible. Skipping.
2014-11-04 14:48:31.361 hazelworker[59335] Unrecognized keys in record returned from condition AppleScript: (
    hazelOutputAttributes
)
2014-11-04 14:48:31.367 hazelworker[59335] [Error] Error during rule evaluation: Received error while trying to evaluate rule Contando letras on file arbol.pdf
2014-11-04 14:48:31.367 hazelworker[59335] Error while matching rule Contando letras against file /Users/edenexposito/Desktop/Trabajando con atributos/arbol.pdf: Error executing AppleScript: {
    NSLocalizedDescription = "Can\U2019t make missing value into type integer.";
    NSLocalizedFailureReason = "Can\U2019t make missing value into type integer.";
    OSAScriptErrorAppAddressKey = "<NSAppleEventDescriptor: null()>";
    OSAScriptErrorBriefMessageKey = "Can\U2019t make missing value into type integer.";
    OSAScriptErrorExpectedTypeKey = "<NSAppleEventDescriptor: 'long'>";
    OSAScriptErrorMessageKey = "Can\U2019t make missing value into type integer.";
    OSAScriptErrorNumberKey = "-1700";
    OSAScriptErrorOffendingObjectKey = "<NSAppleEventDescriptor: 'msng'>";
    OSAScriptErrorRangeKey = "NSRange: {0, 0}";
}
2014-11-04 14:48:31.367 hazelworker[59335] DEBUG: Tapping error retry sequence
2014-11-04 14:48:31.367 hazelworker[59335] ###main load address: 0x10487b000
2014-11-04 14:48:31.367 hazelworker[59335] ###Noodle load address: 0x10498c000
2014-11-04 14:48:31.367 hazelworker[59335] ###CK load address: 0x104950000
2014-11-04 14:48:31.368 hazelworker[59335] (
   0   CoreFoundation                      0x00007fff8918564c __exceptionPreprocess + 172
   1   libobjc.A.dylib                     0x00007fff8db7a6de objc_exception_throw + 43
   2   CoreFoundation                      0x00007fff891854fd +[NSException raise:format:] + 205
   3   hazelworker                         0x00000001048aa014 hazelworker + 192532
   4   Foundation                          0x00007fff923b63da -[NSPredicateOperator performOperationUsingObject:andObject:] + 285
   5   Foundation                          0x00007fff923b5ae2 -[NSComparisonPredicate evaluateWithObject:substitutionVariables:] + 313
   6   hazelworker                         0x00000001048e12c5 hazelworker + 418501
   7   hazelworker                         0x00000001048e13bd hazelworker + 418749
   8   hazelworker                         0x00000001048e0069 hazelworker + 413801
   9   hazelworker                         0x00000001048eaf7a hazelworker + 458618
   10  hazelworker                         0x00000001048de5d0 hazelworker + 406992
   11  hazelworker                         0x00000001048b29cf hazelworker + 227791
   12  hazelworker                         0x0000000104881e91 hazelworker + 28305
   13  hazelworker                         0x0000000104883728 hazelworker + 34600
   14  hazelworker                         0x0000000104885750 hazelworker + 42832
   15  libdyld.dylib                       0x00007fff935515c9 start + 1
)
2014-11-04 14:48:31.375 hazelworker[59335] Unrecognized keys in record returned from condition AppleScript: (
    hazelOutputAttributes
)
2014-11-04 14:48:31.377 hazelworker[59335] [Error] Error during rule evaluation: Received error while trying to evaluate rule Contando letras on file casa.pdf
2014-11-04 14:48:31.377 hazelworker[59335] Error while matching rule Contando letras against file /Users/edenexposito/Desktop/Trabajando con atributos/casa.pdf: Error executing AppleScript: {
    NSLocalizedDescription = "Can\U2019t make missing value into type integer.";
    NSLocalizedFailureReason = "Can\U2019t make missing value into type integer.";
    OSAScriptErrorAppAddressKey = "<NSAppleEventDescriptor: null()>";
    OSAScriptErrorBriefMessageKey = "Can\U2019t make missing value into type integer.";
    OSAScriptErrorExpectedTypeKey = "<NSAppleEventDescriptor: 'long'>";
    OSAScriptErrorMessageKey = "Can\U2019t make missing value into type integer.";
    OSAScriptErrorNumberKey = "-1700";
    OSAScriptErrorOffendingObjectKey = "<NSAppleEventDescriptor: 'msng'>";
    OSAScriptErrorRangeKey = "NSRange: {0, 0}";
}
2014-11-04 14:48:31.377 hazelworker[59335] DEBUG: Tapping error retry sequence
2014-11-04 14:48:31.377 hazelworker[59335] ###main load address: 0x10487b000
2014-11-04 14:48:31.377 hazelworker[59335] ###Noodle load address: 0x10498c000
2014-11-04 14:48:31.377 hazelworker[59335] ###CK load address: 0x104950000
2014-11-04 14:48:31.377 hazelworker[59335] (
   0   CoreFoundation                      0x00007fff8918564c __exceptionPreprocess + 172
   1   libobjc.A.dylib                     0x00007fff8db7a6de objc_exception_throw + 43
   2   CoreFoundation                      0x00007fff891854fd +[NSException raise:format:] + 205
   3   hazelworker                         0x00000001048aa014 hazelworker + 192532
   4   Foundation                          0x00007fff923b63da -[NSPredicateOperator performOperationUsingObject:andObject:] + 285
   5   Foundation                          0x00007fff923b5ae2 -[NSComparisonPredicate evaluateWithObject:substitutionVariables:] + 313
   6   hazelworker                         0x00000001048e12c5 hazelworker + 418501
   7   hazelworker                         0x00000001048e13bd hazelworker + 418749
   8   hazelworker                         0x00000001048e0069 hazelworker + 413801
   9   hazelworker                         0x00000001048eaf7a hazelworker + 458618
   10  hazelworker                         0x00000001048de5d0 hazelworker + 406992
   11  hazelworker                         0x00000001048b29cf hazelworker + 227791
   12  hazelworker                         0x0000000104881e91 hazelworker + 28305
   13  hazelworker                         0x0000000104883728 hazelworker + 34600
   14  hazelworker                         0x0000000104885750 hazelworker + 42832
   15  libdyld.dylib                       0x00007fff935515c9 start + 1
edenexposito
 
Posts: 35
Joined: Sat Nov 05, 2011 4:17 pm
Location: Palma de Mallorca - SPAIN

I think one of the variables is evaluating to either NULL or missing value. Check for that before exporting the values. I'll need to think about how to handle those values and whether to be more lenient with them.
Mr_Noodle
Site Admin
 
Posts: 11866
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:I think one of the variables is evaluating to either NULL or missing value. Check for that before exporting the values. I'll need to think about how to handle those values and whether to be more lenient with them.


I had test code in Applescript and all seems works correct. Please test it in your applescript editor.

Code: Select all
tell application "Finder"
   set theFile to (application file "TextEdit" of folder "Applications" of startup disk) as alias
end tell

tell application "Finder"
   set archivo to displayed name of file theFile
   set c_Archivo to (count of characters of archivo)
end tell


tell application "Finder"
   set extension to name extension of file theFile
   set c_Extension to (count of characters of extension)
   set c_Nombre to (c_Archivo - c_Extension - 1)
end tell

-- c_Archivo: Count All characters of filename+extension (dot included)
-- c_Name: Count name characters filename-extension (dot NOT included)
-- c_Extension: count extension characters (dot NOT included)

return {c_Archivo, c_Nombre, c_Extension}


I think that the problem is with Hazel and hazelOutputAttributes or inputAttributes. Correct me if I'm wrong.

Image
edenexposito
 
Posts: 35
Joined: Sat Nov 05, 2011 4:17 pm
Location: Palma de Mallorca - SPAIN

I'm working on this though as a side question: is there a reason why you have this split between two scripts? At least for the moment, you may want to consider consolidating that since it seems like passing something back to Hazel and then back into a script is unnecessary.
Mr_Noodle
Site Admin
 
Posts: 11866
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:I'm working on this though as a side question: is there a reason why you have this split between two scripts? At least for the moment, you may want to consider consolidating that since it seems like passing something back to Hazel and then back into a script is unnecessary.


I want show an example to other people of how this new elements works in Hazel. I know that i can achieve the results in only 1 script :)

I think that your new additions can be really great if works as expected. :wink:
edenexposito
 
Posts: 35
Joined: Sat Nov 05, 2011 4:17 pm
Location: Palma de Mallorca - SPAIN


Return to Support