Skip to content

store.get_menu() raised an exception #115

@DrLatency

Description

@DrLatency

I was just going through the tutorial but can't get store.get_menu() to work.

My code:

from pizzapi import *
customer = Customer('Donald', 'Trump', 'donald@whitehouse.gov', '2024561111')
address = Address('2175 S 11th Ave', 'Bozeman', 'MT', '59715')
store = address.closest_store()
menu = store.get_menu()

results in terminal:

from pizzapi import *
customer = Customer('Donald', 'Trump', 'donald@whitehouse.gov', '2024561111')
address = Address('2175 S 11th Ave', 'Bozeman', 'MT', '59715')
store = address.closest_store()
menu = store.get_menu()
customer = Customer('Donald', 'Trump', 'donald@whitehouse.gov', '2024561111')
address = Address('2175 S 11th Ave', 'Bozeman', 'MT', '59715')
store = address.closest_store()
menu = store.get_menu()
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pizzapi/store.py", line 24, in get_menu
menu = Menu(response, self.country)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pizzapi/menu.py", line 50, in init
self.root_categories[key] = self.build_categories(value)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pizzapi/menu.py", line 62, in build_categories
new_subcategory = self.build_categories(subcategory, category)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pizzapi/menu.py", line 66, in build_categories
raise Exception('PRODUCT NOT FOUND: %s %s' % (product_code, category.code))
Exception: PRODUCT NOT FOUND: 9418 CouponPizza

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions