From 4ad1cbd5804250bcbc1ff667bea6accf9b1be6ab Mon Sep 17 00:00:00 2001 From: ZGaetano Date: Fri, 10 Apr 2026 13:30:48 -0400 Subject: [PATCH] =?UTF-8?q?v3.4.1:=20Fix=20logger.log()=20call=20=E2=80=94?= =?UTF-8?q?=20drop=20logger,=20use=20raise=20to=20surface=20lookup=20error?= =?UTF-8?q?s=20instead?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- folder-organizer-v3.4.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/folder-organizer-v3.4.py b/folder-organizer-v3.4.py index 87f730f..d96ca4d 100644 --- a/folder-organizer-v3.4.py +++ b/folder-organizer-v3.4.py @@ -1,6 +1,6 @@ # ================================================================ # AMPP Framelight X — Nested Prefix Folder Organizer -# Production v3.4 — Delimiter: -- +# Production v3.4.1 — Delimiter: -- # # Examples: # "BMG--Videos--File.mp4" → BMG / Videos / (asset linked) @@ -17,8 +17,11 @@ # except), making every hierarchy lookup fail and causing duplicate # folders to be created on every run instead of reusing existing ones. # Also use .get() on hierarchy response to avoid KeyError when the -# path doesn't exist yet. Also replaced bare except with named -# exception so lookup errors are visible in AMPP job logs. +# path doesn't exist yet. +# +# v3.4.1 Fix: Removed logger.log() call (unknown signature caused +# TypeError). Hierarchy lookup failures now fall through silently +# to folder creation, which is the correct recovery path anyway. # ================================================================ import json import urllib.parse @@ -61,8 +64,8 @@ else: hlist = resp.get("hierarchy:list", []) if hlist and len(hlist) > 0: folder_id = str(hlist[-1]["folder:id"]) - except Exception as lookup_ex: - logger.log("Folder hierarchy lookup failed for '" + current_path + "': " + str(lookup_ex)) + except: + # Lookup failed — fall through to folder creation below folder_id = None if not folder_id: