"error while trying to evaluate rule" on encrypted PDFs

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

Moderator: Mr_Noodle

I can't get Hazel to do it's magic on encrypted PDFs. The rules I'm using do not "read" the contents of the files, they are set to read the file name and rename with the date added and a new description and then move to a specific folder.
I tried to recreate the rule but no luck Here are the logs.

FILE 1
2015-03-29 07:39:28.899 hazelworker[7558] Could not import text data for file: /Users/renepedro/Dropbox/-Pagar-/gvtinv_519740129453.pdf
2015-03-29 07:39:28.900 hazelworker[7558] [Error] Error during rule evaluation: Received error while trying to evaluate rule boleto condo ondina -> Finance on file gvtinv_519740129453.pdf
2015-03-29 07:39:28.900 hazelworker[7558] Error while matching rule boleto condo ondina -> Finance against file /Users/renepedro/Dropbox/-Pagar-/gvtinv_519740129453.pdf: Could not import text from /Users/renepedro/Dropbox/-Pagar-/gvtinv_519740129453.pdf.
2015-03-29 07:39:28.900 hazelworker[7558] ###main load address: 0x103176000
2015-03-29 07:39:28.900 hazelworker[7558] ###Noodle load address: 0x103286000
2015-03-29 07:39:28.900 hazelworker[7558] ###CK load address: 0x10324b000
2015-03-29 07:39:28.900 hazelworker[7558] (
0 CoreFoundation 0x00007fff8ca3366c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff88a0576e objc_exception_throw + 43
2 CoreFoundation 0x00007fff8ca3351d +[NSException raise:format:] + 205
3 hazelworker 0x00000001031a4a10 hazelworker + 190992
4 Foundation 0x00007fff8b79016a -[NSPredicateOperator performOperationUsingObject:andObject:] + 285
5 Foundation 0x00007fff8b78f872 -[NSComparisonPredicate evaluateWithObject:substitutionVariables:] + 313
6 hazelworker 0x00000001031dcfb4 hazelworker + 421812
7 hazelworker 0x00000001031dd0ac hazelworker + 422060
8 hazelworker 0x00000001031dbc99 hazelworker + 416921
9 hazelworker 0x00000001031e6c3f hazelworker + 461887
10 hazelworker 0x00000001031da200 hazelworker + 410112
11 hazelworker 0x00000001031ae5df hazelworker + 230879
12 hazelworker 0x000000010317d5a6 hazelworker + 30118
13 hazelworker 0x000000010317ee12 hazelworker + 36370
14 hazelworker 0x0000000103180e42 hazelworker + 44610
15 libdyld.dylib 0x00007fff8bb265c9 start + 1

FILE 2
)
2015-03-29 07:39:29.037 hazelworker[7558] Could not import text data for file: /Users/renepedro/Dropbox/-Pagar-/Infoemail_Bradesco.pdf
2015-03-29 07:39:29.037 hazelworker[7558] [Error] Error during rule evaluation: Received error while trying to evaluate rule boleto condo ondina -> Finance on file Infoemail_Bradesco.pdf
2015-03-29 07:39:29.037 hazelworker[7558] Error while matching rule boleto condo ondina -> Finance against file /Users/renepedro/Dropbox/-Pagar-/Infoemail_Bradesco.pdf: Could not import text from /Users/renepedro/Dropbox/-Pagar-/Infoemail_Bradesco.pdf.
2015-03-29 07:39:29.037 hazelworker[7558] ###main load address: 0x103176000
2015-03-29 07:39:29.037 hazelworker[7558] ###Noodle load address: 0x103286000
2015-03-29 07:39:29.037 hazelworker[7558] ###CK load address: 0x10324b000
2015-03-29 07:39:29.037 hazelworker[7558] (
0 CoreFoundation 0x00007fff8ca3366c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff88a0576e objc_exception_throw + 43
2 CoreFoundation 0x00007fff8ca3351d +[NSException raise:format:] + 205
3 hazelworker 0x00000001031a4a10 hazelworker + 190992
4 Foundation 0x00007fff8b79016a -[NSPredicateOperator performOperationUsingObject:andObject:] + 285
5 Foundation 0x00007fff8b78f872 -[NSComparisonPredicate evaluateWithObject:substitutionVariables:] + 313
6 hazelworker 0x00000001031dcfb4 hazelworker + 421812
7 hazelworker 0x00000001031dd0ac hazelworker + 422060
8 hazelworker 0x00000001031dbc99 hazelworker + 416921
9 hazelworker 0x00000001031e6c3f hazelworker + 461887
10 hazelworker 0x00000001031da200 hazelworker + 410112
11 hazelworker 0x00000001031ae5df hazelworker + 230879
12 hazelworker 0x000000010317d5a6 hazelworker + 30118
13 hazelworker 0x000000010317ee12 hazelworker + 36370
14 hazelworker 0x0000000103180e42 hazelworker + 44610
15 libdyld.dylib 0x00007fff8bb265c9 start + 1
rpedro
 
Posts: 29
Joined: Wed Jun 27, 2012 6:17 am

If it's password protected, it won't work. You'll have to convert it to a decrypted file for Hazel to be able to read it.
Mr_Noodle
Site Admin
 
Posts: 11867
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I see, I'll have to find a workaround.
Thanks Mr Noodle.
rpedro
 
Posts: 29
Joined: Wed Jun 27, 2012 6:17 am

I tried a few more things and the rules are actually working. The Hazel rule is set to read just the file name, and not the encrypted file contents, and that's what was bugging me. If you don't try to access the encrypted data, it should work, and it is.

The problem is somehow the folder that the rule is applied to. I duplicated the rule to another folder and copied the files there and BOOM, it worked instantaneously.

Funny thing is I have a lot of rules set to the same "problematic" folder and all work, except this one. Weird.
rpedro
 
Posts: 29
Joined: Wed Jun 27, 2012 6:17 am

Whoops, I missed that part. The logs say that it is reading the contents. Are you sure there isn't such a condition there? Or maybe there's another rule reading the contents?
Mr_Noodle
Site Admin
 
Posts: 11867
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I already deleted the old rule, but you may be right.
I noticed that when I open Hazel (usually I go to the the menu bar icon and choose "Open Hazel..."), and then double click on a rule, the window is cut in the bottom. It shows just the first 2 lines of "Do the following to the matched file or folder".
If a rule has more than 2 actions I can't see them, but it just happens the first time I open it. If I close and double click again the rule appears with all its information, no cut window.
Maybe there was a "hidden" action related to read the file contents that was causing the error.

FYI, I saw that because the new rule was giving a message that the "file couldn't be moved because source and destination are the same". Turns out there was a duplicate rule to move the file, hidden in the bottom of the window.

I'm in OS X 10.10.2 and Hazel 3.3.4 built 1232, in case you wanna look into it.
rpedro
 
Posts: 29
Joined: Wed Jun 27, 2012 6:17 am

Can you export the rule and email it to support?
Mr_Noodle
Site Admin
 
Posts: 11867
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support