From e61a9aa626f601292b1f0b8747a58162de51754b Mon Sep 17 00:00:00 2001 From: RemixDev Date: Tue, 21 Sep 2021 08:57:16 +0200 Subject: [PATCH] Add stack to unknown error report --- deemix/downloader.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/deemix/downloader.py b/deemix/downloader.py index 3355d34..635899a 100644 --- a/deemix/downloader.py +++ b/deemix/downloader.py @@ -1,5 +1,6 @@ from concurrent.futures import ThreadPoolExecutor from time import sleep +import traceback from os.path import sep as pathSep from os import makedirs, system as execute @@ -487,7 +488,8 @@ class Downloader: logger.exception("%s %s", f"{itemData['artist']} - {itemData['title']}", e) result = {'error': { 'message': str(e), - 'data': itemData + 'data': itemData, + 'stack': traceback.format_exc() }} if 'error' in result: @@ -501,7 +503,8 @@ class Downloader: 'failed': True, 'data': error['data'], 'error': error['message'], - 'errid': error['errid'] if 'errid' in error else None + 'errid': error['errid'] if 'errid' in error else None, + 'stack': error['stack'] if 'stack' in error else None }) return result