diff --git a/control-pipeline/scripts/reupload_legal_strategy.py b/control-pipeline/scripts/reupload_legal_strategy.py index f886ac3..3767527 100644 --- a/control-pipeline/scripts/reupload_legal_strategy.py +++ b/control-pipeline/scripts/reupload_legal_strategy.py @@ -381,7 +381,13 @@ def main(): continue # 2. Get text - text = get_text(doc) + try: + text = get_text(doc) + except Exception as e: + print(f" ERROR extracting text: {e}") + results.append({"file": doc["upload_filename"], "old": old_count, + "new": 0, "sect": 0}) + continue # 3. Upload with legal strategy print(" Uploading with strategy='legal'...")