-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
store.get_menu() raised an exception #115
Comments
The following work around seems to do the trick. Inside of menu.py - comment out line 66 and add a 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. |
i have the same issue ... |
Getting error Exception: PRODUCT NOT FOUND: 5199 CouponPizza as well Going to the try the continue idea above |
I was just going through the tutorial but can't get store.get_menu() to work.
My code:
results in terminal:
The text was updated successfully, but these errors were encountered: