From 8479cbf6577f45c13dde6eff0170adea1789b444 Mon Sep 17 00:00:00 2001 From: Jim Liu Date: Sun, 10 Feb 2019 16:14:50 +0800 Subject: [PATCH] fix TypeError issue fix: Traceback (most recent call last): File "buff2steam.py", line 122, in highest_buy_order = Decimal(orders_data['highest_buy_order']) TypeError: conversion from NoneType to Decimal is not supported --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 0e51790..e64d61b 100644 --- a/main.py +++ b/main.py @@ -116,7 +116,7 @@ def remove_exponent(d): steam_order_api.format(item_nameid), proxies=proxies ).json() - if 'highest_buy_order' not in orders_data: + if 'highest_buy_order' not in orders_data or not orders_data['highest_buy_order']: continue highest_buy_order = Decimal(orders_data['highest_buy_order'])