gustavo-hsm / PoE_TradeLedger

Tools to query and track public offers listed on Path of Exile's Trade API
1 stars 0 forks source link

TypeError: 'NoneType' object is not subscriptable #1

Closed gustavo-hsm closed 4 years ago

gustavo-hsm commented 4 years ago

'buying_currency': item['listing']['price']['currency']. TypeError: 'NoneType' object is not subscriptable

gustavo-hsm commented 4 years ago

Noticed this happening overnight. Couldn't track exactly which item listing caused this, but the error message suggests a NoneType could be passed onto that field.

gustavo-hsm commented 4 years ago

Some offers had empty price data, possibly because the trader left it empty (such as currency laying on the stash). I added a quick check to evaluate is there's data on that field. A null value will be in place of both 'buying_currency' and 'buying_price' fields, should new offers fall on this category again.