Skip to content

Commit

Permalink
fix TypeError issue
Browse files Browse the repository at this point in the history
fix:
Traceback (most recent call last):
  File "buff2steam.py", line 122, in <module>
    highest_buy_order = Decimal(orders_data['highest_buy_order'])
TypeError: conversion from NoneType to Decimal is not supported
  • Loading branch information
hldh214 committed Feb 10, 2019
1 parent 3924734 commit 8479cbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down

0 comments on commit 8479cbf

Please sign in to comment.