OK, I found and fixed the problem, but along the way I discovered what might be some sort of caching bug which I thought I'd share in case it helps.
Before I start that explanation I will also share that no matter what I tried, I could not update to version 5.3.2 as you suggested. It simply wouldn't recognise that a newer version than 5.3.1 was available...but that did happen recently (some weeks later) without me doing anything and so now I'm on version 5.3.2. Importantly, the "caching bug" that I'm about to describe to you occured
with version 5.3.2.
So...let's get the embarrassing part out of the way. The error was occurring because all the AppleScripts I use were all trying to write small text files to a "sandbox" folder used by Excel for Mac and somewhere along the way, Microsoft decided to change the folder path slightly in one of the Excel version updates. I use VBA to do "Stuff" with those files...
https://macexcel.com/examples/setupinfo/sandbox/Previous path was:
"/Users/[username]/Library/Group Containers/UBF8T346G9.Office/
Excel/"
New path is:
"/Users/[username]/Library/Group Containers/UBF8T346G9.Office/
Excel Library/"
(facepalm) Thanks, Microsoft!
So...easy fix...I changed ALL those AppeScripts to point to the updated
"Excel Library" directory path! (If I was smart enough, I'd know how to make all the AppleScripts point to a central "Global" variable somewhere, but I don't know how to do that, so each and every one of the script files has that folder path embedded in the script code (there are 2 reasons I'm telling you this, only 1 of which is hoping you'll tell me the secret to doing the global variable thing...

). Never mind, I'll ask ChatGPT.
So, the scripts all started working again when the Hazel rules matched!
YAY! 
Except for 2 scripts...both were being called by the same Hazel rule (it calls 2 scripts in succession under actions when the rule matches). Argh! Why doesn't it work?! I was CERTAIN that I had updated every one of those script files with the updated
Excel Library folder path...and...as it turns out...I had! So, I started debugging. I eventually worked out how to view the logs in the Console (wish I'd known before...it would have led me to the first issue much quicker!) and I found this:
2024-03-18 21:51:09.943 hazelworker[55498] OSAScript error: {
NSLocalizedDescription = "sh: /Users/lachlan/Library/Group Containers/UBF8T346G9.Office/
Excel/Macro Tickets/55 Bradbury-20240318-215109.txt:
No such file or directory";
NSLocalizedFailureReason = "sh: /Users/lachlan/Library/Group Containers/UBF8T346G9.Office/
Excel/Macro Tickets/55 Bradbury-20240318-215109.txt:
No such file or directory";
It's still pointing to the OLD folder path...so, I took the following troubleshooting steps:
1. Double-check that scripts are correct (they were)
2. Edit the rule actions which call those AppleScripts by removing and then re-adding all the
imported attributes (didn't solve)3. Update file timestamp on the relevant AppleScript files by re-saving them
(didn't solve)4. Remove the actions from the Hazel rule which call the scripts and re-add those actions from scratch
(didn't solve)5. As above but
saved the Hazel Rule after removing the actions and before re-adding them
(didn't solve)6. As above but
QUIT Hazel after removing the actions (and saving the rule) before re-adding them
(SOLVED!)Seems like a maybe caching issue to me, but will leave you to ponder...