From 0ed965f11c456a3e9df15ce71f951e8d835d175a Mon Sep 17 00:00:00 2001 From: Edward Runkel Date: Sat, 9 Jan 2021 21:43:22 -0500 Subject: [PATCH 1/2] Adding in extra info logs for when errors happen here in the future. This way the SQL query is replicatable in order to fix the error. --- src/DatabaseInteractor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/DatabaseInteractor.py b/src/DatabaseInteractor.py index fa06427..3ff5d28 100644 --- a/src/DatabaseInteractor.py +++ b/src/DatabaseInteractor.py @@ -57,6 +57,8 @@ def execute_sql_and_get_results(self, sql, values = None): except: self.logger.exception(f'Unexpected error: {exc_info()[0]}') + self.logger.info(f'SQL to execute: {sql}') + self.logger.indo(f'Values: {values}') def execute_sql_with_commit(self, sql, values = None): try: @@ -70,3 +72,5 @@ def execute_sql_with_commit(self, sql, values = None): except: self.logger.exception(f'Unexpected error: {exc_info()[0]}') + self.logger.info(f'SQL to execute: {sql}') + self.logger.indo(f'Values: {values}') From a7727fe585f856dcf9f72c5b3f565b30bcf86d1a Mon Sep 17 00:00:00 2001 From: Edward Runkel Date: Sat, 9 Jan 2021 21:49:15 -0500 Subject: [PATCH 2/2] Update the `requirements` file to make sure the version of `pip` is up to date. Otherwise some packages may not be found --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index dbdb59b..44d3b44 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +pip MechanicalSoup mysql.connector pingparsing