tFix constant and print exception error if there is one. - btcticker - eInk Bitcoin price ticker HTML git clone https://git.parazyd.org/btcticker DIR Log DIR Files DIR Refs DIR README DIR LICENSE --- DIR commit cd4ff7d3e3cb5e290731ae02fdac95f7c1e4c6bb DIR parent 25335b5147c47f618a38bf0cf7d465925254a240 HTML Author: parazyd <parazyd@dyne.org> Date: Wed, 3 Mar 2021 10:15:06 +0100 Fix constant and print exception error if there is one. Diffstat: M ticker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- DIR diff --git a/ticker.py b/ticker.py t@@ -44,7 +44,7 @@ font_date = ImageFont.truetype(join(fontdir, 'PixelSplitter-Bold.ttf'), 11) currency = 'usd' coin = 'bitcoin' -tokenfilename = join(picdir, 'currency/%s.bmp' % currency) +tokenfilename = join(picdir, 'currency/%s.bmp' % coin) athbitmap = Image.open(join(picdir, 'ATH.bmp')) tokenimage = Image.open(tokenfilename) t@@ -68,8 +68,8 @@ def get_data(other): try: timeseriesarray = requests.get(url_hist).json()['prices'] - except JSONDecodeError: - print('Caught JSONDecodeError') + except JSONDecodeError as err: + print(f'Caught JSONDecodeError: {repr(err)}') return None timeseriesstack = [] length = len(timeseriesarray)