From 1f41e64c26b5d82b2e6e853a9ce51f587f396819 Mon Sep 17 00:00:00 2001 From: Zvonimir Sabljic Date: Tue, 12 Sep 2023 21:39:43 +0200 Subject: [PATCH] Better logging of errors --- pilot/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pilot/main.py b/pilot/main.py index d4f9a84..dfe8348 100644 --- a/pilot/main.py +++ b/pilot/main.py @@ -2,6 +2,7 @@ from __future__ import print_function, unicode_literals import sys +import traceback from dotenv import load_dotenv load_dotenv() from termcolor import colored @@ -37,7 +38,7 @@ if __name__ == "__main__": exit_gpt_pilot() except Exception as e: print(colored('---------- GPT PILOT EXITING WITH ERROR ----------', 'red')) - print(colored(e, 'red')) + traceback.print_exc() print(colored('--------------------------------------------------', 'red')) exit_gpt_pilot() finally: