Hazel rules crash on embedded script

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

Moderator: Mr_Noodle

Hazel rules crash on embedded script Sat May 11, 2013 5:56 pm • by rmnelson
I have a number of rules designed to sort incoming monthly pdf statements into folders/subfolders contained within my Dropbox folder. These statements include bank, utility, credit card, and investments. All the rules use awk to extract the date from the pdf. I've had a good number of the rules crash after the first use, and the fix is to rebuild the rule identically including copying and pasting the scripts at which point things work fine. The rules match in the preview window but crash on the subsequent script. Duplicating the rule does not work; the duplicated rule also crashes. But a newly built rule, identical in every respect, works perfectly. This is not an issue where the date is moving around in the pdf and the script needs to be adjusted. It is simply that the rule, or a duplicated rule crashes every time where an identical rule built from scratch works fine.

Is it possible that something about dropbox is causing rules to crash? Should I change these scripts to move the statements initially to a folder not in dropbox and subsequently, with another rule that doesn't involve a script but only looks at the file name, move them to the appropriate dropbox folder?

Richard
rmnelson
 
Posts: 5
Joined: Fri Apr 05, 2013 9:06 pm

Re: Hazel rules crash on embedded script Sun May 12, 2013 11:51 am • by a_freyer
Are these new rules? I anticipate the embedded script handling may have contained errors which have been fixed in a more recent version.
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Re: Hazel rules crash on embedded script Sun May 12, 2013 1:01 pm • by rmnelson
These are rules that worked on statements appearing in April and before. The May statements are now coming in and the rules no longer work although preview shows that the individual pdfs are recognized correctly. The failure appears to be in a script at the start of the "do the following..." section of the rule. If I duplicate the failing rule the duplicated rule fails as well. If I build a new rule, identical in every detail to the original, the new rule works.

I wondered if this might be due to sorting into Dropbox folders. But your question makes me wonder if there us some underlying failure in the old rule for which the only fix is to do as I have been doing and rebuild each rule from scratch. At this point every incoming statement that involves one of these substantially similar rules has failed and required that I build a new, identical rule. As a new user I guess what I am wondering is if this is going to be an ongoing problem which is why I was focusing on possible dropbox issues, or if it is more of a one time deal because of the 4/18 update to Hazel.

Thanks!
rmnelson
 
Posts: 5
Joined: Fri Apr 05, 2013 9:06 pm

Re: Hazel rules crash on embedded script Sun May 12, 2013 2:00 pm • by sjk
I've never used Hazel directly on Dropbox folders, and haven't seen your rules/scripts, but maybe the issue could be worked around by adding certain "Date …" conditions that delay Hazel actions to eliminate or reduce risk of interference with synching (if that's what's causing trouble now).
sjk
 
Posts: 332
Joined: Thu Aug 02, 2007 5:43 pm
Location: Eugene

Re: Hazel rules crash on embedded script Sun May 12, 2013 9:01 pm • by a_freyer
All of my rules with scripts operate within dropbox folders. I do to believe this is your issue. I might suggest posting the script.
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Re: Hazel rules crash on embedded script Mon May 13, 2013 12:41 pm • by Mr_Noodle
I suggest emailing support with a copy of the rule that fails and the one that workse.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron