$ python utils/recipe_maintenance.py
Working directory: /app
------------------------------------------------------------
🛠️ Starting recipe maintenance...
==================================================
🔧 Full maintenance mode
📋 Step 1: Processing unparsed recipes...
🔍 Scanning recipes for parsing status...
2026-06-14 16:07:44,763 - mealie_client - INFO - MealieClient initialized in API mode
🔍 Scanning for unparsed recipes...
🔧 Initializing USearch ANN index with dimension 4096
✅ USearch index initialized for cosine similarity search
✅ USearch index loaded with 117 vectors
2026-06-14 16:07:44,769 - recipe_rag - INFO - ✅ ANN index loaded with 117 recipes
📦 Found 100 known unparsed recipes in local index
✅ All recipes have known parsing status
📋 Returning 100 unparsed recipes
🔧 Initializing USearch ANN index with dimension 4096
✅ USearch index initialized for cosine similarity search
✅ USearch index loaded with 117 vectors
2026-06-14 16:07:44,772 - recipe_rag - INFO - ✅ ANN index loaded with 117 recipes
✅ Found 100 recipes needing parsing
🚀 Parsing 100 recipes...
🔍 Validating Mealie connection...
2026-06-14 16:07:45,297 - config - INFO - ✅ Mealie connection successful: https://mealie.geevers.net
2026-06-14 16:07:45,514 - mealie_client - INFO - MealieClient initialized in API mode
🔍 Scanning for unparsed recipes...
🔧 Initializing USearch ANN index with dimension 4096
✅ USearch index initialized for cosine similarity search
✅ USearch index loaded with 117 vectors
2026-06-14 16:07:45,523 - recipe_rag - INFO - ✅ ANN index loaded with 117 recipes
📦 Found 100 known unparsed recipes in local index
✅ All recipes have known parsing status
📋 Returning 100 unparsed recipes
🔍 Scanning for unparsed recipes... found 100
2026-06-14 16:07:45,525 - mealie_client - INFO - MealieClient initialized in API mode
Parsing: 0%| | 0/100 [00:00<?, ?it/s]2026-06-14 16:07:50,832 - mealie_client - INFO - MealieClient initialized in API mode
2026-06-14 16:07:52,886 - __main__ - INFO - Loaded 2779 canonical foods from Mealie
2026-06-14 16:07:52,891 - __main__ - INFO - Direct LLM parsed 9 ingredients, 7 matched to canonical
2026-06-14 16:07:52,892 - mealie_client - INFO - MealieClient initialized in API mode
2026-06-14 16:07:53,044 - __main__ - INFO - Loaded 44 canonical units from Mealie
2026-06-14 16:07:53,045 - mealie_client - INFO - MealieClient initialized in API mode
2026-06-14 16:07:53,163 - mealie_client - INFO - MealieClient initialized in API mode
Parsing: 0%| | 0/100 [00:07<?, ?it/s]
Traceback (most recent call last):
File "/app/mealie_parse.py", line 1847, in <module>
asyncio.run(main(conf_thresh=args.conf,
File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/app/mealie_parse.py", line 1671, in main
patch_recipe(slug, new_list)
File "/app/mealie_parse.py", line 1274, in patch_recipe
(DATA_DIR / "runtime" / "last_payload.json").write_text(json.dumps(payload, indent=2))
File "/usr/local/lib/python3.11/pathlib.py", line 1078, in write_text
with self.open(mode='w', encoding=encoding, errors=errors, newline=newline) as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/pathlib.py", line 1044, in open
return io.open(self, mode, buffering, encoding, errors, newline)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/app/data/runtime/last_payload.json'
2026-06-14 16:07:53,454 - __main__ - WARNING - ⚠️ Recipe parsing had issues
⚠️ Recipe parsing had issues
🔄 Step 2: Syncing local database with Mealie...
🔍 Checking RecipeRAG index completeness...
2026-06-14 16:07:53,456 - mealie_client - INFO - MealieClient initialized in API mode
🔧 Initializing USearch ANN index with dimension 4096
✅ USearch index initialized for cosine similarity search
✅ USearch index loaded with 117 vectors
2026-06-14 16:07:53,643 - recipe_rag - INFO - ✅ ANN index loaded with 117 recipes
✅ Mealie: 118 recipes, RecipeRAG: 117 indexed
Mealie has 118, local has 117
🔄 Syncing local database with Mealie...
📡 Fetching recipe summaries from Mealie...
2026-06-14 16:07:53,644 - mealie_client - INFO - MealieClient initialized in API mode
Found 118 recipes in Mealie
🔧 Initializing USearch ANN index with dimension 4096
✅ USearch index initialized for cosine similarity search
✅ USearch index loaded with 117 vectors
2026-06-14 16:07:53,805 - recipe_rag - INFO - ✅ ANN index loaded with 117 recipes
Found 117 recipes in local DB
📊 To process: 1 new, 0 modified, 117 unchanged
📥 Fetching 1 recipe details...
2026-06-14 16:07:56,969 - __main__ - WARNING - ⚠️ Could not fetch recipe spaghetti-met-chili-broccoli-walnotenpesto: [GET] Network error: HTTPSConnectionPool(host='mealie.geevers.net', port=443): Max retries exceeded with url: /api/recipes/spaghetti-met-chili-broccoli-walnotenpesto (Caused by ResponseError('too many 500 error responses')) (endpoint=/recipes/spaghetti-met-chili-broccoli-walnotenpesto)
❌ Maintenance failed: cannot unpack non-iterable NoneType object
------------------------------------------------------------
❌ Failed with exit code: 1