PictoPy icon indicating copy to clipboard operation
PictoPy copied to clipboard

fix: improve SQLite error handling and logging in face_clusters.py

Open ajithhraj opened this issue 8 months ago • 3 comments

face_clusters.py has multiple problems:

  • db_delete_all_clusters uses broad except Exception and print() instead of logging
  • db_insert_clusters_batch catches no exceptions at all
  • 5 other functions have no exception handling

Proposed fix

  • Replace except Exception with sqlite3.Error across all functions
  • Replace print() with logger.error()
  • Add sqlite3.Error handling to unprotected functions
  • Add import logging and logger = logging.getLogger(__name__)

I'd like to fix this.

ajithhraj avatar Mar 17 '26 12:03 ajithhraj

šŸ‘‹ Thanks for opening this issue! The maintainers will review it shortly. Till then, do not open any PR. This is a strict rule we like to follow around here :)

github-actions[bot] avatar Mar 17 '26 12:03 github-actions[bot]

Hello šŸ‘‹ I am interested in working on this issue. I have basic knowledge of Python and I’m eager to learn and contribute. I will try to provide a clean and well-documented solution. Please assign this issue to me if possible. Thank you 😊

JITENDRAGAHERWAR03 avatar Mar 30 '26 03:03 JITENDRAGAHERWAR03

@rohan-pandeyy Can I please work on this issue?

VanshajPoonia avatar Jun 27 '26 18:06 VanshajPoonia