yentsun / price_watch

An engine for price monitoring service (Pyramid + ZODB)
http://food-price.net/
1 stars 1 forks source link

TypeError: 'NoneType' object has no attribute '__getitem__' @ category.get_data #45

Closed yentsun closed 9 years ago

yentsun commented 9 years ago

Added debug print above line... https://github.com/yentsun/price_watch/blob/master/price_watch/models.py#L66 Very strange:

print(target, subcategories.keys(), target in subcategories.keys())

Outputs:

('grapefruit', ['kiwi', 'apple', 'pomegranate', 'pear', 'pomelo', 'orange', 'mangostin', 'lime', 'lemon', 'peach', 'plum', 'avocado', 'grapefriut', 'mango', 'pineapple', 'melon', 'quince', 'banana'], False)
yentsun commented 9 years ago

doh... a typo: grapefriut