Varous bug fixes. Finalized targeted guidance algo

This commit is contained in:
Jaret Burkett
2023-11-10 12:18:08 -07:00
parent fa6d91ba76
commit 7782caa468
5 changed files with 92 additions and 138 deletions

View File

@@ -775,9 +775,9 @@ class PoiFileItemDTOMixin:
with open(caption_path, 'r', encoding='utf-8') as f:
json_data = json.load(f)
if 'poi' not in json_data:
raise Exception(f"Error: poi not found in caption file: {caption_path}")
print(f"Warning: poi not found in caption file: {caption_path}")
if self.poi not in json_data['poi']:
raise Exception(f"Error: poi not found in caption file: {caption_path}")
print(f"Warning: poi not found in caption file: {caption_path}")
# poi has, x, y, width, height
# do full image if no poi
self.poi_x = 0