Describe the bug or improvement
The database module backend/app/database/yolo_mapping.py contains leftover debugging code (import os and print(os.getcwd())) that clutters the console output every time the YOLO classes table is created.
Additionally, the database execution block lacks proper except sqlite3.Error handling and logging, which is inconsistent with the rest of the database modules.
Proposed Solution
- Remove the leftover
import os and print(os.getcwd()) from db_create_YOLO_classes_table.
- Wrap the
cursor.execute calls in an except sqlite3.Error block to catch and log database failures properly using the project's standard logger (logger.error()), matching the recent cleanup done in faces.py, metadata.py, etc.
This is a good first issue for anyone looking to contribute!
Describe the bug or improvement
The database module
backend/app/database/yolo_mapping.pycontains leftover debugging code (import osandprint(os.getcwd())) that clutters the console output every time the YOLO classes table is created.Additionally, the database execution block lacks proper
except sqlite3.Errorhandling and logging, which is inconsistent with the rest of the database modules.Proposed Solution
import osandprint(os.getcwd())fromdb_create_YOLO_classes_table.cursor.executecalls in anexcept sqlite3.Errorblock to catch and log database failures properly using the project's standard logger (logger.error()), matching the recent cleanup done infaces.py,metadata.py, etc.This is a good first issue for anyone looking to contribute!