Doesn't seem to work anymore?
The API wrapped seems to no longer be in use, any update?
It's still fine, @tryformy. People still use it.
It doesnt work for me I get this error when doing menu = store.get_menu
Exception has occurred: Exception
PRODUCT NOT FOUND: 9216 CouponPizza
File "D:\footb\Documents\Side Projects\Python pizza project\main.py", line 15, in
The following work around seems to do the trick.
Inside of menu.py - comment out line 66 and add a continue statement when the conditional is triggered:
def build_categories(self, category_data, parent=None): category = MenuCategory(category_data, parent) for subcategory in category_data['Categories']: new_subcategory = self.build_categories(subcategory, category) category.subcategories.append(new_subcategory) for product_code in category_data['Products']: if product_code not in self.menu_by_code: # raise Exception('PRODUCT NOT FOUND: %s %s' % (product_code, category.code)) continue product = self.menu_by_code[product_code] category.products.append(product) product.categories.append(category) return category
Instead of raising an exception when a product category is not found, it will just skip adding that product category and continue building.