recipes
recipes copied to clipboard
Cannot import SK opendata
Tandoor Version
1.5.15
Setup
Docker / Docker-Compose
Reverse Proxy
Nginx Proxy Manager (NPM)
Other
No response
Bug description
I'm trying to import tandor open data (sk) version but I consistently get these errors:
- Food: I get popup saying There was an error creating a resource!
- Unit: OK
- Category: OK
- Property: OK
- Store: OK
- Conversion: Successfully created a resource! but in the details I see that out of 149 objects imported there were 149 errors
I tried importing (en) data, that works OK. I even started completely blank instance but the errors are the same.
I did the Open data translation for SK and I know I left some keys that do not have a coresponding version in Slovak language blank. Could this be the issue?
Relevant logs
Food import errors
{'selected_version': 'sk', 'selected_datatypes': {'food': {'name': 'food', 'selected': True}, 'unit': {'name': 'unit', 'selected': False}, 'category': {'name': 'category', 'selected': False}, 'property': {'name': 'property', 'selected': False}, 'store': {'name': 'store', 'selected': False}, 'conversion': {'name': 'conversion', 'selected': False}}, 'update_existing': True, 'use_metric': True}
Internal Server Error: /api-import-open-data/
Traceback (most recent call last):
File "/opt/recipes/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
return view_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 104, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/cookbook/views/api.py", line 1601, in post
response_obj['food'] = data_importer.import_food().to_dict()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 342, in import_food
'supermarket_category_id': self.slug_id_cache['category'][self.data[datatype][k]['store_category']],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'category-deli'
ERROR:django.request:Internal Server Error: /api-import-open-data/
Traceback (most recent call last):
File "/opt/recipes/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
return view_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 104, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/cookbook/views/api.py", line 1601, in post
response_obj['food'] = data_importer.import_food().to_dict()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 342, in import_food
'supermarket_category_id': self.slug_id_cache['category'][self.data[datatype][k]['store_category']],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'category-deli'
Category import errors
{'selected_version': 'sk', 'selected_datatypes': {'food': {'name': 'food', 'selected': False}, 'unit': {'name': 'unit', 'selected': False}, 'category': {'name': 'category', 'selected': False}, 'property': {'name': 'property', 'selected': False}, 'store': {'name': 'store', 'selected': False}, 'conversion': {'name': 'conversion', 'selected': True}}, 'update_existing': True, 'use_metric': True}
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-potatoes'
Traceback (most recent call last):
food-potatoes is not in self.slug_id_cache["food"]
food-ketchup is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-ketchup'
Traceback (most recent call last):
food-banana is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-banana'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-corn-canned'
Traceback (most recent call last):
food-corn-canned is not in self.slug_id_cache["food"]
food-pasta-sauce-red is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-pasta-sauce-red'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-mustard'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-salsa'
Traceback (most recent call last):
food-mustard is not in self.slug_id_cache["food"]
food-salsa is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-cheese-cheddar'
Traceback (most recent call last):
food-cheese-cheddar is not in self.slug_id_cache["food"]
food-flour-wheat-all-purpose is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-flour-wheat-all-purpose'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-coconut-meat-dried-desiccated-sweetened-flaked'
food-coconut-meat-dried-desiccated-sweetened-flaked is not in self.slug_id_cache["food"]
food-tahini is not in self.slug_id_cache["food"]
food-butter-unsalted is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-tahini'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-butter-unsalted'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-butter-salted'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-olives-black'
food-butter-salted is not in self.slug_id_cache["food"]
food-olives-black is not in self.slug_id_cache["food"]
food-cheese-ricotta-whole-milk is not in self.slug_id_cache["food"]
food-syrups-maple is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-cheese-ricotta-whole-milk'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-syrups-maple'
food-asparagus-green is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-asparagus-green'
Traceback (most recent call last):
food-flour-00 is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-flour-00'
food-flour-almond is not in self.slug_id_cache["food"]
food-flour-spelt-whole-grain is not in self.slug_id_cache["food"]
food-leavening-agents-baking-soda is not in self.slug_id_cache["food"]
food-blueberries-raw is not in self.slug_id_cache["food"]
food-bulgur-dry is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-flour-almond'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-flour-spelt-whole-grain'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-leavening-agents-baking-soda'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-blueberries-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-bulgur-dry'
food-buttermilk-whole is not in self.slug_id_cache["food"]
food-white-beans-from-canned-no-added-fat is not in self.slug_id_cache["food"]
food-kale is not in self.slug_id_cache["food"]
food-chickpeas-canned-no-added-fat is not in self.slug_id_cache["food"]
food-chocolate-chips is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
food-cilantro-raw is not in self.slug_id_cache["food"]
food-canned-coconut-milk is not in self.slug_id_cache["food"]
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-buttermilk-whole'
food-coconut-milk is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-white-beans-from-canned-no-added-fat'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-kale'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-chickpeas-canned-no-added-fat'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-chocolate-chips'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-cilantro-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-canned-coconut-milk'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-coconut-milk'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-coconut-water-unsweetened'
food-coconut-water-unsweetened is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-collards-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
food-collards-raw is not in self.slug_id_cache["food"]
food-spices-coriander-seed is not in self.slug_id_cache["food"]
food-cornstarch is not in self.slug_id_cache["food"]
food-couscous-dry is not in self.slug_id_cache["food"]
food-cream-of-tartar is not in self.slug_id_cache["food"]
food-spices-cumin-seed is not in self.slug_id_cache["food"]
food-currants-dried is not in self.slug_id_cache["food"]
KeyError: 'food-spices-coriander-seed'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-cornstarch'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-couscous-dry'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-cream-of-tartar'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-spices-cumin-seed'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-currants-dried'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-currants-european-black-raw'
food-currants-european-black-raw is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-currants-red-and-white-raw'
food-currants-red-and-white-raw is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-cashews-raw'
food-cashews-raw is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-cashews-roasted'
Traceback (most recent call last):
food-cashews-roasted is not in self.slug_id_cache["food"]
food-cashews-salted is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-cashews-salted'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-cranberries-dried'
food-cranberries-dried is not in self.slug_id_cache["food"]
food-cranberries-raw is not in self.slug_id_cache["food"]
food-spices-marjoram-dried is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-cranberries-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-spices-marjoram-dried'
Traceback (most recent call last):
food-spices-savory-ground is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-spices-savory-ground'
Traceback (most recent call last):
food-cereals-farina-unenriched is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-cereals-farina-unenriched'
Traceback (most recent call last):
food-fig-raw is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-fig-raw'
Traceback (most recent call last):
food-flax-seeds is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-flax-seeds'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-ghee-clarified-butter'
food-ghee-clarified-butter is not in self.slug_id_cache["food"]
food-gooseberries-raw is not in self.slug_id_cache["food"]
food-grapefruit-raw is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-gooseberries-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-grapefruit-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-grapefruit-raw'
Traceback (most recent call last):
food-grapefruit-raw is not in self.slug_id_cache["food"]
food-grapefruit-juice is not in self.slug_id_cache["food"]
food-grapefruit-juice is not in self.slug_id_cache["food"]
food-grapes-raw is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
food-plantains-green-raw is not in self.slug_id_cache["food"]
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-grapefruit-juice'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-grapefruit-juice'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-grapes-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-plantains-green-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-cream-half-and-half'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-hazelnuts'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-honey'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-jalapenos'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-lemon-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-lemon-juice'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-lemon-juice'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
food-cream-half-and-half is not in self.slug_id_cache["food"]
food-hazelnuts is not in self.slug_id_cache["food"]
food-honey is not in self.slug_id_cache["food"]
food-jalapenos is not in self.slug_id_cache["food"]
food-lemon-raw is not in self.slug_id_cache["food"]
food-lemon-juice is not in self.slug_id_cache["food"]
food-lemon-juice is not in self.slug_id_cache["food"]
food-lemon-peel-raw is not in self.slug_id_cache["food"]
food-lentils-raw is not in self.slug_id_cache["food"]
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-lemon-peel-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-lentils-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-lentils-pink-or-red-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-lime-raw'
food-lentils-pink-or-red-raw is not in self.slug_id_cache["food"]
food-lime-raw is not in self.slug_id_cache["food"]
food-lime-juice is not in self.slug_id_cache["food"]
food-lime-juice is not in self.slug_id_cache["food"]
food-mayonnaise-regular is not in self.slug_id_cache["food"]
food-spearmint-dried is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-lime-juice'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-lime-juice'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
food-miso is not in self.slug_id_cache["food"]
food-molasses is not in self.slug_id_cache["food"]
food-rice-noodles-cooked is not in self.slug_id_cache["food"]
food-spices-nutmeg-ground is not in self.slug_id_cache["food"]
food-peanuts-unroasted is not in self.slug_id_cache["food"]
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-mayonnaise-regular'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-spearmint-dried'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-miso'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-molasses'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-rice-noodles-cooked'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-spices-nutmeg-ground'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-peanuts-unroasted'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-peanuts-roasted-unsalted'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
food-peanuts-roasted-unsalted is not in self.slug_id_cache["food"]
food-peanuts-roasted-salted is not in self.slug_id_cache["food"]
food-pecans-unroasted is not in self.slug_id_cache["food"]
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-peanuts-roasted-salted'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-pecans-unroasted'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-pecans-unsalted'
food-pecans-unsalted is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-pecans-salted'
food-pecans-salted is not in self.slug_id_cache["food"]
Traceback (most recent call last):
food-canola-oil is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-canola-oil'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-sunflower-oil'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-coconut-oil'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food-sunflower-oil is not in self.slug_id_cache["food"]
food-coconut-oil is not in self.slug_id_cache["food"]
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-peanut-oil'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-safflower-oil'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-sesame-oil'
food-peanut-oil is not in self.slug_id_cache["food"]
food-safflower-oil is not in self.slug_id_cache["food"]
food-sesame-oil is not in self.slug_id_cache["food"]
food-okra-raw is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-okra-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-onions-yellow-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-spices-onion-powder'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-orange-juice'
food-onions-yellow-raw is not in self.slug_id_cache["food"]
food-spices-onion-powder is not in self.slug_id_cache["food"]
food-orange-juice is not in self.slug_id_cache["food"]
food-orange-juice is not in self.slug_id_cache["food"]
food-spices-oregano-dried is not in self.slug_id_cache["food"]
food-oyster-sauce is not in self.slug_id_cache["food"]
food-spices-paprika is not in self.slug_id_cache["food"]
food-barley-pearled-raw is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-orange-juice'
Traceback (most recent call last):
food-spices-pepper-black is not in self.slug_id_cache["food"]
food-pine-nuts is not in self.slug_id_cache["food"]
food-pistachio-nuts-unsalted is not in self.slug_id_cache["food"]
food-pistachio-nuts-salted is not in self.slug_id_cache["food"]
food-spices-poppy-seed is not in self.slug_id_cache["food"]
food-pumpkin-seeds-unsalted is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-spices-oregano-dried'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-oyster-sauce'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-spices-paprika'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-barley-pearled-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-spices-pepper-black'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
food-pumpkin-seeds-salted is not in self.slug_id_cache["food"]
food-quinoa-uncooked is not in self.slug_id_cache["food"]
food-radish-raw is not in self.slug_id_cache["food"]
food-raisins is not in self.slug_id_cache["food"]
food-spices-rosemary-dried is not in self.slug_id_cache["food"]
food-leavening-agents-baking-powder is not in self.slug_id_cache["food"]
food-eggs-medium is not in self.slug_id_cache["food"]
food-spices-saffron is not in self.slug_id_cache["food"]
KeyError: 'food-pine-nuts'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-pistachio-nuts-unsalted'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-pistachio-nuts-salted'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-spices-poppy-seed'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-pumpkin-seeds-unsalted'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-pumpkin-seeds-salted'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-quinoa-uncooked'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-radish-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-raisins'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-spices-rosemary-dried'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-leavening-agents-baking-powder'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-eggs-medium'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-spices-saffron'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-spices-sage-ground'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-fish-salmon-pink-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-fish-sardines-canned'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
food-spices-sage-ground is not in self.slug_id_cache["food"]
food-fish-salmon-pink-raw is not in self.slug_id_cache["food"]
food-fish-sardines-canned is not in self.slug_id_cache["food"]
food-sauerkraut is not in self.slug_id_cache["food"]
food-sesame-seeds is not in self.slug_id_cache["food"]
food-spinach-raw is not in self.slug_id_cache["food"]
food-peas-green-split-raw is not in self.slug_id_cache["food"]
KeyError: 'food-sauerkraut'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-sesame-seeds'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-spinach-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-peas-green-split-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-summer-squash-yellow-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-summer-squash-green-zucchini-raw'
food-summer-squash-yellow-raw is not in self.slug_id_cache["food"]
food-summer-squash-green-zucchini-raw is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-sauce-sriracha'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-pesto'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-seeds-sunflower-unsalted'
food-sauce-sriracha is not in self.slug_id_cache["food"]
food-pesto is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-milk-condensed-sweetened'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-milk-evaporated-whole'
food-seeds-sunflower-unsalted is not in self.slug_id_cache["food"]
food-milk-condensed-sweetened is not in self.slug_id_cache["food"]
food-milk-evaporated-whole is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-tempeh'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-thyme-fresh'
food-tempeh is not in self.slug_id_cache["food"]
food-thyme-fresh is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-spices-thyme-dried'
Traceback (most recent call last):
food-spices-thyme-dried is not in self.slug_id_cache["food"]
food-tomatoes-grape is not in self.slug_id_cache["food"]
food-tomatoes-cherry is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-tomatoes-grape'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-tomatoes-cherry'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-tomatoes-plum'
Traceback (most recent call last):
food-tomatoes-plum is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-spices-turmeric-ground'
food-spices-turmeric-ground is not in self.slug_id_cache["food"]
food-turnip-raw is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-turnip-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food-vanilla-extract is not in self.slug_id_cache["food"]
food-ice-cream-vanilla is not in self.slug_id_cache["food"]
food-vegetable-broth-bouillon is not in self.slug_id_cache["food"]
food-watercress-raw is not in self.slug_id_cache["food"]
food-watermelon-raw is not in self.slug_id_cache["food"]
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-vanilla-extract'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-ice-cream-vanilla'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-vegetable-broth-bouillon'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-watercress-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-watermelon-raw'
Traceback (most recent call last):
food-wine-white is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-wine-white'
Traceback (most recent call last):
food-wine-red is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-wine-red'
Traceback (most recent call last):
food-wine-rice is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-wine-rice'
Traceback (most recent call last):
food-worcestershire-sauce is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-worcestershire-sauce'
Traceback (most recent call last):
food-egg-yolk-raw is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-egg-yolk-raw'
Traceback (most recent call last):
food-egg-yolk-raw is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-egg-yolk-raw'
Traceback (most recent call last):
food-egg-white-raw is not in self.slug_id_cache["food"]
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-egg-white-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-egg-white-raw'
food-egg-white-raw is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-potatoes'
OK so here's an update I went into admin console and in supermarket category I added category-deli key after that I tried importing Food again. I got different error:
{'selected_version': 'sk', 'selected_datatypes': {'food': {'name': 'food', 'selected': True}, 'unit': {'name': 'unit', 'selected': False}, 'category': {'name': 'category', 'selected': False}, 'property': {'name': 'property', 'selected': False}, 'store': {'name': 'store', 'selected': False}, 'conversion': {'name': 'conversion', 'selected': False}}, 'update_existing': True, 'use_metric': True}
Internal Server Error: /api-import-open-data/
Traceback (most recent call last):
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute
return super().execute(query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.IntegrityError: UNIQUE constraint failed: cookbook_food.space_id, cookbook_food.name
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/recipes/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
return view_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 104, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/cookbook/views/api.py", line 1601, in post
response_obj['food'] = data_importer.import_food().to_dict()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 374, in import_food
Food.load_bulk(create_list, None)
File "/opt/recipes/venv/lib/python3.12/site-packages/treebeard/models.py", line 115, in load_bulk
node_obj = cls.add_root(**node_data)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/cookbook/models.py", line 165, in add_root
return super().add_root(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/treebeard/mp_tree.py", line 623, in add_root
return MP_AddRootHandler(cls, **kwargs).process()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/treebeard/mp_tree.py", line 341, in process
newobj.save()
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/models/base.py", line 814, in save
self.save_base(
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/models/base.py", line 877, in save_base
updated = self._save_table(
^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/models/base.py", line 1020, in _save_table
results = self._do_insert(
^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django_prometheus/models.py", line 43, in _do_insert
::ffff:172.23.0.3 - - [24/Mar/2024:14:32:16 +0100] "POST /api-import-open-data/ HTTP/1.0" 500 244461 "https://recipes.rynik.duckdns.org/space-manage/1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
return super()._do_insert(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/models/base.py", line 1061, in _do_insert
return manager._insert(
^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/models/query.py", line 1805, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 1822, in execute_sql
cursor.execute(sql, params)
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/backends/utils.py", line 102, in execute
return super().execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/backends/utils.py", line 84, in _execute
with self.db.wrap_database_errors:
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute
return super().execute(query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
django.db.utils.IntegrityError: UNIQUE constraint failed: cookbook_food.space_id, cookbook_food.name
ERROR:django.request:Internal Server Error: /api-import-open-data/
Traceback (most recent call last):
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute
return super().execute(query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.IntegrityError: UNIQUE constraint failed: cookbook_food.space_id, cookbook_food.name
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/recipes/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
return view_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 104, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/cookbook/views/api.py", line 1601, in post
response_obj['food'] = data_importer.import_food().to_dict()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 374, in import_food
Food.load_bulk(create_list, None)
File "/opt/recipes/venv/lib/python3.12/site-packages/treebeard/models.py", line 115, in load_bulk
node_obj = cls.add_root(**node_data)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/cookbook/models.py", line 165, in add_root
return super().add_root(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/treebeard/mp_tree.py", line 623, in add_root
return MP_AddRootHandler(cls, **kwargs).process()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/treebeard/mp_tree.py", line 341, in process
newobj.save()
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/models/base.py", line 814, in save
self.save_base(
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/models/base.py", line 877, in save_base
updated = self._save_table(
^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/models/base.py", line 1020, in _save_table
results = self._do_insert(
^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django_prometheus/models.py", line 43, in _do_insert
return super()._do_insert(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/models/base.py", line 1061, in _do_insert
return manager._insert(
^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/models/query.py", line 1805, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 1822, in execute_sql
cursor.execute(sql, params)
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/backends/utils.py", line 102, in execute
return super().execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/backends/utils.py", line 84, in _execute
with self.db.wrap_database_errors:
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute
return super().execute(query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
django.db.utils.IntegrityError: UNIQUE constraint failed: cookbook_food.space_id, cookbook_food.name
After that I unchecked `update existing data and the import passed OK for Food.
The I tried importing Conversion whis now passed OK with only three errors:
{'selected_version': 'sk', 'selected_datatypes': {'food': {'name': 'food', 'selected': False}, 'unit': {'name': 'unit', 'selected': False}, 'category': {'name': 'category', 'selected': False}, 'property': {'name': 'property', 'selected': False}, 'store': {'name': 'store', 'selected': False}, 'conversion': {'name': 'conversion', 'selected': True}}, 'update_existing': True, 'use_metric': True}
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-banana'
food-banana is not in self.slug_id_cache["food"]
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
food-cilantro-raw is not in self.slug_id_cache["food"]
KeyError: 'food-cilantro-raw'
Traceback (most recent call last):
File "/opt/recipes/cookbook/helper/open_data_importer.py", line 456, in import_conversion
food_id=self.slug_id_cache['food'][self.data[datatype][k]['food']],
food-canned-coconut-milk is not in self.slug_id_cache["food"]
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'food-canned-coconut-milk'
I think this issue might be related to incomplete translations. This should be handled by the build script in the open data repo itself but maybe I missed something. Will need to look into this in more detail
Thanks for the response. If you need more details I can provide them. Or if you point in the right direction I can do some investigation too.
the problem is the conversion import. The list of conversion should only include conversions where the foods and units are in the language dataset. This is done by the build script https://github.com/TandoorRecipes/open-tandoor-data/blob/main/build.py
What I think is happening is that some foods are not translated for SK, thus they are left out of the dataset. The conversions shoudl detect that the foods or units are missing and not include the conversion but it seems that this is not the case.
That could be it, Deli key is the only one with missing value in the sk.json