Clean hazel preview

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

Moderator: Mr_Noodle

Clean hazel preview Sat Nov 03, 2018 8:36 am • by mr.xluk9
Hello, new user here.

Is it possible to clean the preview dialog from the previous scripts errors?
The preview keep showing previous python exception.
It is difficult to understand if the errors are triggered by the last script version or not.
The last matched time is not helpful in case of errors.
I attached a picture to show that my scripts are working fine, but the preview is showing errors.


https://imgur.com/a/YLL7Mfr
mr.xluk9
 
Posts: 5
Joined: Tue Oct 30, 2018 1:07 pm

Re: Clean hazel preview Mon Nov 05, 2018 12:15 pm • by Mr_Noodle
It's showing the error from the last time it ran. You'll need to run it again to get the latest error. If the script is in a condition, you can use the preview function for that specific rule to test it there.
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Clean hazel preview Mon Nov 05, 2018 12:21 pm • by mr.xluk9
I also thought so, but it is strange because the error in the image on the OP was showing even after the next executions of the script(fixed version). I know it, because the script zips some archive and I was looking at the working directory of the script. Yet, the preview dialog kept showing the error. Maybe I'll make a short clip when I find a little bit of time.
mr.xluk9
 
Posts: 5
Joined: Tue Oct 30, 2018 1:07 pm

Re: Clean hazel preview Mon Nov 05, 2018 1:47 pm • by mr.xluk9
Here is the video, I hope you can understand from this.

https://drive.google.com/open?id=1-ikqdTvT5Sqn2sETDb-LDbUiBPIDZcCi

- The watching folder is triggered when "any subfolder of subfile" changes or new file are created.
- The top finder window is a subfolder of the watching folder
- The bottom finder is where the script create the archive
mr.xluk9
 
Posts: 5
Joined: Tue Oct 30, 2018 1:07 pm

Re: Clean hazel preview Tue Nov 06, 2018 11:13 am • by Mr_Noodle
It's a bit hard for me to make out the text. I suggest checking the logs and posting the error that appears there.
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Clean hazel preview Sun Nov 18, 2018 1:58 pm • by mr.xluk9
Hello, sorry for the late reply. I don't think this would be helpful, but I hope so.
As you can see I had a problem with my zipping script, fixed it. But the preview dialog still showing the error

Look at the timing of the error in the log and the timing in the screenshot (which is taken after fixed and working script)

https://pastebin.com/vyPBwPkp
https://postimg.cc/KR7F339D
mr.xluk9
 
Posts: 5
Joined: Tue Oct 30, 2018 1:07 pm

Re: Clean hazel preview Mon Nov 19, 2018 1:10 pm • by Mr_Noodle
I'm unable to reproduce this on my end with a simple script that throw an error.

Can you replicate it on a test folder with a simpler script? Or is the problem somehow unique to that particular folder and/or the script you are using?
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Clean hazel preview Wed Nov 21, 2018 1:48 pm • by mr.xluk9
Yes, you right. I appreciate your patient.I cannot either reproduce it with a simple test folder with a simple python script.

So, now my question is: How does the clean up of the preview dialog works?
I can see that my script throws an error not on the matched files/folder, but on some sub folder/file.
Since the subfiles names are retrieved from the python script and not from the Hazel theFile parameter, could it be that the problem?

Maybe explaining my scenario a little bit more would be helpful. So these are the condition
- The folder's name must match this pattern "DD - ADD", where DD are two digits.
- The folder's subfiles/subfolder modification date has changed
- The folder musst contains a special file FF.txt. I check it with a python script.
- If yes, I run another python script as action

The action script:
- Get files from FF.txt
- Move them in another temporary folder (on Desktop)
- Zip the files and remove the temporary folder

A lot can go wrong in the action script, in fact sometime it throws an error and stop the whole process. I fix the problem quickly, usually a check on the files on FF.txt. Rerun manually the rule and check if the zip is created. Usually the zip is created, but the preview dialog keep showing the thrown error.

I'm having hard time debugging this problem, I can only imagine your difficulty in understanding it. So,
maybe a feature request would be to have the option to manually clean the preview dialog from errors (like a button)?
mr.xluk9
 
Posts: 5
Joined: Tue Oct 30, 2018 1:07 pm

Re: Clean hazel preview Fri Nov 23, 2018 1:08 pm • by Mr_Noodle
I don't think manually clearing it is the answer. It should automatically reflect the latest status.

Can you email in to support? I may want to go deeper into the diagnostics and possibly have you run a test build.
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support