ephes / kptncook

Fetch receipts from kptncook API and export them to mealie or paprika
MIT License
42 stars 4 forks source link

sync-with-mealie: no Step-Images since Mealie V1.0.0-RC2 #31

Closed FXSZ closed 8 months ago

FXSZ commented 11 months ago

Hello everyone,

there is a problem in the current build which causes the images of the individual steps to no longer be displayed correctly in Mealie V1.0.0-RC2 (and also not in the nightly-build from 22.12.2023) when using sync-with-mealie.

There is no problem visible in the log of mealie (the Recipe-Images are working properly in both Versions):

INFO: 10-Dec-23 23:19:15    Recipe Directory Removed: rote-thai-curry-suppe-mit-reisnudeln-rauchertofu-pak-choi
INFO: 10-Dec-23 23:19:22    Image URL: https://kptncookmobile2.herokuapp.com/image/656863685b0000497be72e5c?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6
INFO: 10-Dec-23 23:19:23    HTTP Request: GET https://kptncookmobile2.herokuapp.com/image/656863685b0000497be72e5c?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6 "HTTP/1.1 200 OK"
INFO: 10-Dec-23 23:19:24    original.jpg minified
INFO: 10-Dec-23 23:19:24    Tiny image saved
INFO: 10-Dec-23 23:19:35    Image URL: https://d2am1qai33sroc.cloudfront.net/image/63cfb34d520000fc04ff7f95?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6
INFO: 10-Dec-23 23:19:36    HTTP Request: GET https://d2am1qai33sroc.cloudfront.net/image/63cfb34d520000fc04ff7f95?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6 "HTTP/1.1 200 OK"
INFO: 10-Dec-23 23:19:36    original.jpg minified
INFO: 10-Dec-23 23:19:36    Tiny image saved

Here we see V1.0.0-RC1.2 on the left and V1.0.0.-RC1.1 on the right: the step-images still appear correctly in V1.0.0-RC1.1:

Bildschirm­foto 2023-12-11 um 09 14 56

Both Mealie versions are running seperately in Docker:

Here is the log from my mealie-nightly container:

 2023-12-11 09:17:35 INFO:     Started server process [15]
 2023-12-11 09:17:35 INFO:     Waiting for application startup.
 2023-12-11 09:17:35 INFO:     Application startup complete.
 2023-12-11 09:17:35 INFO:     Uvicorn running on http://0.0.0.0:9000 (Press CTRL+C to quit)
 2023-12-11 09:18:02 INFO:     127.0.0.1:51216 - "GET /api/app/about HTTP/1.1" 200 OK
 2023-12-11 09:18:15 INFO:     192.168.65.1:37977 - "GET /api/users/self HTTP/1.1" 401 Unauthorized
 2023-12-11 09:18:15 INFO:     192.168.65.1:37978 - "GET /api/explore/organizers/home/categories?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1" 200 OK
 2023-12-11 09:18:15 INFO:     192.168.65.1:37980 - "GET /api/explore/organizers/home/tags?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1" 200 OK
 2023-12-11 09:18:15 INFO:     192.168.65.1:37982 - "GET /api/explore/organizers/home/tools?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1" 200 OK
 2023-12-11 09:18:15 INFO:     192.168.65.1:37977 - "GET /api/explore/cookbooks/home?page=1&perPage=-1&orderBy=position&orderDirection=asc HTTP/1.1" 200 OK
 2023-12-11 09:18:15 INFO:     192.168.65.1:37981 - "GET /api/explore/recipes/home?page=1&perPage=64&orderBy=created_at&orderDirection=desc&paginationSeed=1702282695409&searchSeed=1702282695409&search=&requireAllCategories=false&requireAllTags=false&requireAllTools=false&requireAllFoods=false HTTP/1.1" 200 OK
 2023-12-11 09:18:15 INFO:     192.168.65.1:37979 - "GET /api/explore/foods/home?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1" 200 OK
 2023-12-11 09:18:15 INFO:     192.168.65.1:37977 - "GET /api/media/recipes/c57ee990-353b-4b97-97af-842f3717db99/images/min-original.webp?rnd=1&version= HTTP/1.1" 200 OK
 2023-12-11 09:18:15 INFO:     192.168.65.1:37978 - "GET /api/media/recipes/eed4fe1e-2623-4f3d-8d3b-1976211676d1/images/min-original.webp?rnd=1&version= HTTP/1.1" 200 OK
 2023-12-11 09:18:20 INFO:     192.168.65.1:37984 - "GET /api/app/about HTTP/1.1" 200 OK
 2023-12-11 09:18:20 INFO:     192.168.65.1:37983 - "GET /api/app/about/startup-info HTTP/1.1" 200 OK
 2023-12-11 09:18:24 INFO:     192.168.65.1:37984 - "POST /api/auth/token HTTP/1.1" 200 OK
 2023-12-11 09:18:24 INFO:     192.168.65.1:37984 - "GET /api/users/self HTTP/1.1" 200 OK
 2023-12-11 09:18:25 INFO:     192.168.65.1:37983 - "GET /api/organizers/tools?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1" 200 OK
 2023-12-11 09:18:25 INFO:     192.168.65.1:37986 - "GET /api/media/users/b3e273c2-7083-4d4e-8294-cd6a2a62ac7f/profile.webp?cacheKey=1234 HTTP/1.1" 200 OK
 2023-12-11 09:18:25 INFO:     192.168.65.1:37985 - "GET /api/recipes?page=1&perPage=64&orderBy=created_at&orderDirection=desc&paginationSeed=1702282705187&searchSeed=1702282705187&search=&requireAllCategories=false&requireAllTags=false&requireAllTools=false&requireAllFoods=false HTTP/1.1" 200 OK
 2023-12-11 09:18:25 INFO:     192.168.65.1:37984 - "GET /api/organizers/categories?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1" 200 OK
 2023-12-11 09:18:26 INFO:     192.168.65.1:37983 - "GET /api/admin/about/check HTTP/1.1" 200 OK
 2023-12-11 09:18:27 INFO:     192.168.65.1:37984 - "GET /api/admin/about HTTP/1.1" 200 OK
 2023-12-11 09:18:33 INFO:     127.0.0.1:52272 - "GET /api/app/about HTTP/1.1" 200 OK
 2023-12-11 09:18:51 INFO:     192.168.65.1:37987 - "GET /api/admin/maintenance/logs?lines=500 HTTP/1.1" 200 OK
 2023-12-11 09:18:59 INFO:     192.168.65.1:37988 - "GET /api/organizers/tools?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1" 200 OK
 2023-12-11 09:18:59 INFO:     192.168.65.1:37990 - "GET /api/organizers/categories?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1" 200 OK
 2023-12-11 09:18:59 INFO:     192.168.65.1:37989 - "GET /api/recipes?page=1&perPage=64&orderBy=created_at&orderDirection=desc&paginationSeed=1702282739701&searchSeed=1702282739701&search=&requireAllCategories=false&requireAllTags=false&requireAllTools=false&requireAllFoods=false HTTP/1.1" 200 OK
 2023-12-11 09:19:03 INFO:     127.0.0.1:37442 - "GET /api/app/about HTTP/1.1" 200 OK
 2023-12-11 09:19:03 INFO:     192.168.65.1:37990 - "GET /api/recipes/grunkohl-salat-mit-knusprigem-halloumi HTTP/1.1" 200 OK
 2023-12-11 09:19:03 INFO:     192.168.65.1:37990 - "GET /api/media/recipes/eed4fe1e-2623-4f3d-8d3b-1976211676d1/assets/rez-3502-01.jpg HTTP/1.1" 500 Internal Server Error
 2023-12-11 09:19:03 ERROR:    Exception in ASGI application
 2023-12-11 09:19:03 Traceback (most recent call last):
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/responses.py", line 335, in __call__
 2023-12-11 09:19:03     stat_result = await anyio.to_thread.run_sync(os.stat, self.path)
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
 2023-12-11 09:19:03     return await get_asynclib().run_sync_in_worker_thread(
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
 2023-12-11 09:19:03     return await future
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
 2023-12-11 09:19:03     result = context.run(func, *args)
 2023-12-11 09:19:03 FileNotFoundError: [Errno 2] No such file or directory: '/app/data/recipes/eed4fe1e-2623-4f3d-8d3b-1976211676d1/assets/rez-3502-01.jpg'
 2023-12-11 09:19:03 
 2023-12-11 09:19:03 During handling of the above exception, another exception occurred:
 2023-12-11 09:19:03 
 2023-12-11 09:19:03 Traceback (most recent call last):
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 436, in run_asgi
 2023-12-11 09:19:03     result = await app(  # type: ignore[func-returns-value]
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
 2023-12-11 09:19:03     return await self.app(scope, receive, send)
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/applications.py", line 1106, in __call__
 2023-12-11 09:19:03     await super().__call__(scope, receive, send)
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/applications.py", line 122, in __call__
 2023-12-11 09:19:03     await self.middleware_stack(scope, receive, send)
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in __call__
 2023-12-11 09:19:03     raise exc
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
 2023-12-11 09:19:03     await self.app(scope, receive, _send)
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 24, in __call__
 2023-12-11 09:19:03     await responder(scope, receive, send)
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 44, in __call__
 2023-12-11 09:19:03     await self.app(scope, receive, self.send_with_gzip)
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
 2023-12-11 09:19:03     raise exc
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
 2023-12-11 09:19:03     await self.app(scope, receive, sender)
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
 2023-12-11 09:19:03     raise e
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
 2023-12-11 09:19:03     await self.app(scope, receive, send)
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 718, in __call__
 2023-12-11 09:19:03     await route.handle(scope, receive, send)
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
 2023-12-11 09:19:03     await self.app(scope, receive, send)
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 69, in app
 2023-12-11 09:19:03     await response(scope, receive, send)
 2023-12-11 09:19:03   File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/responses.py", line 338, in __call__
 2023-12-11 09:19:03     raise RuntimeError(f"File at path {self.path} does not exist.")
 2023-12-11 09:19:03 RuntimeError: File at path /app/data/recipes/eed4fe1e-2623-4f3d-8d3b-1976211676d1/assets/rez-3502-01.jpg does not exist.
 2023-12-11 09:19:03 ERROR:    Exception in ASGI application

Is there any fix to make the Step-Images working in Mealie V1.0.0-RC2?

Best Regards Felix

FXSZ commented 11 months ago

And here is the output from "kptncook sync-with-mealie":

kwargs:  {'name': 'Grünkohl-Salat mit knusprigem Halloumi', 'notes': [RecipeNote(title='author comment', text='Salat mit Halloumi on top ist nie ein Flop!')], 'nutrition': Nutrition(calories=762, fat_content=None, protein_content=None, carbohydrate_content=None, fiber_content=None, sodium_content=None, sugar_content=None), 'prep_time': 30, 'cook_time': 0, 'recipe_yield': '1 Portionen', 'recipe_instructions': [RecipeStep(title=None, text='Alles parat?', ingredientReferences=[], image=Image(name='REZ_3502_01.jpg', type='step', url='https://kptncookmobile2.herokuapp.com/image/656863685b0000497be72e56?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Zitrone halbieren und Saft auspressen.', ingredientReferences=[], image=Image(name='REZ_3502_02.jpeg', type=None, url='https://d2am1qai33sroc.cloudfront.net/image/609144e0410000a8031f4000?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Kapern fein würfeln.', ingredientReferences=[], image=Image(name='REZ_3502_03.jpg', type='step', url='https://kptncookmobile2.herokuapp.com/image/656863685b0000497be72e57?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Knoblauch schälen und reiben.', ingredientReferences=[], image=Image(name='REZ_3502_04.jpg', type=None, url='https://d2am1qai33sroc.cloudfront.net/image/642bdf8b4d0000a903d3d0ef?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Für das Dressing Tahin, Zitronensaft (1/2 TL p.P.), Knoblauch, Kapern, Kapernlake (1/2 TL p.P.), Dijon Senf, Salz, Pfeffer und einen Spritzer warmes Wasser (1 TL p.P.) in einer kleinen Schüssel mischen. Zutaten mit einem Schneebesen glatt rühren. Wenn das Dressing zu dickflüssig ist, kann nach und nach ein Spritzer Wasser hinzugegeben werden. Mit Salz und Pfeffer würzen, dann beiseite stellen.', ingredientReferences=[], image=Image(name='REZ_3502_05.jpg', type='step', url='https://kptncookmobile2.herokuapp.com/image/656863685b0000497be72e59?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Grünkohl waschen und trocken schütteln. Den Strunk entfernen und fein hacken.', ingredientReferences=[], image=Image(name='REZ_3502_06.jpg', type=None, url='https://d2am1qai33sroc.cloudfront.net/image/6183a9a54b00003e076859ce?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Karotte schälen und grob raspeln.', ingredientReferences=[], image=Image(name='REZ_3502_07.jpg', type=None, url='https://d2am1qai33sroc.cloudfront.net/image/60c0ff0f3f000031006eabfa?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Radieschen waschen, putzen und grob raspeln.', ingredientReferences=[], image=Image(name='REZ_3502_08.jpg', type=None, url='https://kptncookmobile2.herokuapp.com/image/6564bc145b000089c5882590?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Rote Bete reiben.', ingredientReferences=[], image=Image(name='REZ_3502_09.jpg', type=None, url='https://d2am1qai33sroc.cloudfront.net/image/60c0c53d410000d420f9af7b?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Halloumi quer in Scheiben schneiden.', ingredientReferences=[], image=Image(name='REZ_3502_10.jpg', type=None, url='https://d2am1qai33sroc.cloudfront.net/image/61b0c8ae4700002703a253cc?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Kürbiskerne in einer Pfanne ohne Öl goldbraun rösten.', ingredientReferences=[], image=Image(name='REZ_3502_11.jpg', type=None, url='https://d2am1qai33sroc.cloudfront.net/image/60c12b074100003700317215?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Kürbiskerne entfernen und die Pfanne auswischen. Hitze auf mittlere bis hohe Stufe stellen und Olivenöl hinzugeben. Sobald das Öl heiß ist, die Halloumi-Scheiben hinzufügen. Auf jeder Seite 1-2 min. braten, bis sie goldbraun sind. Dann aus der Pfanne nehmen.', ingredientReferences=[], image=Image(name='REZ_3502_12.jpeg', type='step', url='https://kptncookmobile2.herokuapp.com/image/65648837590000afbc278152?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='In einer großen Schüssel Grünkohl, Karotten, Radieschen, rote Bete, getrocknete Cranberrys, Dressing, Salz und Pfeffer gut mischen.', ingredientReferences=[], image=Image(name='REZ_3502_13.jpg', type='step', url='https://kptncookmobile2.herokuapp.com/image/656863685b0000497be72e58?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Grünkohl-Salat mit knusprigem Halloumi servieren, mit Kürbiskernen garnieren und genießen!', ingredientReferences=[], image=Image(name='REZ_3502_14.jpg', type='step', url='https://kptncookmobile2.herokuapp.com/image/656863685b0000497be72e5a?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6'))], 'recipe_ingredient': [RecipeIngredient(title='Grünkohl', note=None, unit=RecipeUnit(name='g', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Grünkohl', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=30.0), RecipeIngredient(title='Karotte', note=None, unit=None, food=RecipeUnit(name='Karotte', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=1.0), RecipeIngredient(title='Rote Bete', note='gekocht', unit=RecipeUnit(name='g', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Rote Bete', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=50.0), RecipeIngredient(title='Radieschen', note=None, unit=RecipeUnit(name='Bund', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Radieschen', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=0.16), RecipeIngredient(title='Cranberry', note='getrocknet', unit=RecipeUnit(name='g', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Cranberry', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=15.0), RecipeIngredient(title='Halloumi', note=None, unit=RecipeUnit(name='g', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Halloumi', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=70.0), RecipeIngredient(title='Zitrone', note=None, unit=None, food=RecipeUnit(name='Zitrone', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=0.25), RecipeIngredient(title='Knoblauch', note=None, unit=RecipeUnit(name='Zehe(n)', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Knoblauch', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=0.5), RecipeIngredient(title='Kaper', note=None, unit=RecipeUnit(name='g', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Kaper', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=4.0), RecipeIngredient(title='Olivenöl', note=None, unit=RecipeUnit(name='EL', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Olivenöl', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=1.0), RecipeIngredient(title='Salz', note=None, unit=None, food=RecipeUnit(name='Salz', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=None), RecipeIngredient(title='Pfeffer', note=None, unit=None, food=RecipeUnit(name='Pfeffer', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=None), RecipeIngredient(title='Dijon Senf', note=None, unit=RecipeUnit(name='TL', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Dijon Senf', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=0.25), RecipeIngredient(title='Kürbiskern', note=None, unit=RecipeUnit(name='g', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Kürbiskern', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=12.0), RecipeIngredient(title='Tahin (Sesampaste)', note=None, unit=RecipeUnit(name='g', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Tahin (Sesampaste)', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=40.0)], 'image_url': 'https://kptncookmobile2.herokuapp.com/image/656863685b0000497be72e5c?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6', 'tags': [RecipeTag(name='kptncook', slug=None, group_id=None, id=None)], 'extras': {'kptncook_id': '656483d05b000089c5882337', 'source': 'kptncook'}}
kwargs:  {'name': 'Rote Thai-Curry-Suppe mit Reisnudeln, Räuchertofu & Pak Choi', 'notes': [RecipeNote(title='author comment', text='Schmeckt einfach fan-thai-stisch!')], 'nutrition': Nutrition(calories=737, fat_content=None, protein_content=None, carbohydrate_content=None, fiber_content=None, sodium_content=None, sugar_content=None), 'prep_time': 30, 'cook_time': 10, 'recipe_yield': '1 Portionen', 'recipe_instructions': [RecipeStep(title=None, text='Alles parat?', ingredientReferences=[], image=Image(name='REZ_3159_01.jpg', type='step', url='https://d2am1qai33sroc.cloudfront.net/image/63c67df6500000b90566609d?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Reisnudeln nach Packungsanleitung zubereiten.', ingredientReferences=[], image=Image(name='REZ_3159_02.jpg', type=None, url='https://d2am1qai33sroc.cloudfront.net/image/63b5593e4f0000c507dfcfb6?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Zwiebel schälen, halbieren und in dünne Scheiben schneiden.', ingredientReferences=[], image=Image(name='REZ_3159_03.jpg', type=None, url='https://d2am1qai33sroc.cloudfront.net/image/63b55953570000a30723739b?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Knoblauch schälen und durch eine Knoblauchpresse drücken.', ingredientReferences=[], image=Image(name='REZ_3159_04.jpg', type=None, url='https://d2am1qai33sroc.cloudfront.net/image/607710606900009100e790fd?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Ingwer schälen und reiben.', ingredientReferences=[], image=Image(name='REZ_3159_05.jpg', type=None, url='https://d2am1qai33sroc.cloudfront.net/image/607711f96900009200e7933b?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Öl in einem mittelgroßen Topf erhitzen und Zwiebeln anbraten, bis sie glasig werden. Dann Knoblauch und Ingwer hinzugeben und ca. 1 min. braten.', ingredientReferences=[], image=Image(name='REZ_3159_06.jpg', type='step', url='https://d2am1qai33sroc.cloudfront.net/image/63c67df6500000b90566609e?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Rote Thai-Curry-Paste in den Topf geben und ca. 2 min. kochen, bis die Paste sich dunkelrot färbt.', ingredientReferences=[], image=Image(name='REZ_3159_07.jpg', type='step', url='https://d2am1qai33sroc.cloudfront.net/image/63c67df6500000b90566609f?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Gemüsebrühe und Kokosmilch hinzugeben und gut mit der Currypaste verrühren.', ingredientReferences=[], image=Image(name='REZ_3159_08.jpg', type='step', url='https://d2am1qai33sroc.cloudfront.net/image/63c67df6500000b9056660a0?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Zum Kochen bringen, dann die Hitze auf mittlere bis niedrige Stufe reduzieren und 20 min. köcheln lassen. Dabei gelegentlich umrühren.', ingredientReferences=[], image=Image(name='REZ_3159_09.jpg', type='step', url='https://d2am1qai33sroc.cloudfront.net/image/63c67df6500000b9056660a1?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Pak Choi waschen und abtropfen lassen. Den Strunk abschneiden und die großen Blätter längs halbieren.', ingredientReferences=[], image=Image(name='REZ_3159_07.jpg', type=None, url='https://d2am1qai33sroc.cloudfront.net/image/63b55f7f5100004b072ee8f2?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Währenddessen Koriander waschen, trocken schütteln und Blätter abzupfen.', ingredientReferences=[], image=Image(name='REZ_3159_08.jpg', type=None, url='https://d2am1qai33sroc.cloudfront.net/image/62e7ed084e0000d805c44fc8?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Räuchertofu würfeln.', ingredientReferences=[], image=Image(name='REZ_3159_17.jpg', type=None, url='https://d2am1qai33sroc.cloudfront.net/image/60c13229400000ea0dfca683?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Chilischote in feine Ringe schneiden.', ingredientReferences=[], image=Image(name='REZ_3159_12.jpg', type='step', url='https://d2am1qai33sroc.cloudfront.net/image/63c67df6500000b9056660a2?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Erdnüsse hacken.', ingredientReferences=[], image=Image(name='REZ_3159_10.jpg', type=None, url='https://d2am1qai33sroc.cloudfront.net/image/619e1b533b00001d032f5223?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Limette gründlich mit heißem Wasser waschen, halbieren und in Stücke schneiden.', ingredientReferences=[], image=Image(name='REZ_3159_11.jpg', type=None, url='https://d2am1qai33sroc.cloudfront.net/image/619bae253900003403d52cd5?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Nach 20 min. mit Brühe abschmecken und bei Bedarf mit Salz würzen. Tofuwürfel hinzugeben und 2-3 min. köcheln lassen, bis sie gar sind. Dann Pak Choi unterrühren, bis die Blätter zusammenfallen.', ingredientReferences=[], image=Image(name='REZ_3159_15.jpg', type='step', url='https://d2am1qai33sroc.cloudfront.net/image/63c67df6500000b9056660a3?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6')), RecipeStep(title=None, text='Suppe über die vorbereiteten Reisnudeln geben, heiß servieren und nach Belieben mit Korianderblättern, gehackten Erdnüssen und frischem Chili garnieren. Dazu eine Limettenspalte reichen und genießen.', ingredientReferences=[], image=Image(name='REZ_3159_16.jpg', type='step', url='https://d2am1qai33sroc.cloudfront.net/image/63cfb34d520000fc04ff7f93?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6'))], 'recipe_ingredient': [RecipeIngredient(title='Salz', note=None, unit=None, food=RecipeUnit(name='Salz', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=None), RecipeIngredient(title='Reisnudel', note=None, unit=RecipeUnit(name='g', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Reisnudel', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=60.0), RecipeIngredient(title='Gemüsebrühe', note=None, unit=RecipeUnit(name='ml', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Gemüsebrühe', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=400.0), RecipeIngredient(title='Räuchertofu', note=None, unit=RecipeUnit(name='g', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Räuchertofu', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=80.0), RecipeIngredient(title='Kokosmilch', note=None, unit=RecipeUnit(name='ml', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Kokosmilch', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=150.0), RecipeIngredient(title='rote Currypaste', note=None, unit=RecipeUnit(name='g', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='rote Currypaste', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=22.5), RecipeIngredient(title='Pflanzenöl', note=None, unit=RecipeUnit(name='EL', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Pflanzenöl', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=0.5), RecipeIngredient(title='Gemüsezwiebel', note=None, unit=None, food=RecipeUnit(name='Gemüsezwiebel', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=0.5), RecipeIngredient(title='Knoblauch', note=None, unit=RecipeUnit(name='Zehe(n)', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Knoblauch', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=1.0), RecipeIngredient(title='Koriander', note='frisch', unit=RecipeUnit(name='g', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Koriander', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=2.5), RecipeIngredient(title='Erdnuss', note='geröstet & ungesalzen', unit=RecipeUnit(name='g', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Erdnuss', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=5.0), RecipeIngredient(title='grüne Chilischote', note=None, unit=None, food=RecipeUnit(name='grüne Chilischote', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=0.5), RecipeIngredient(title='Limette', note=None, unit=None, food=RecipeUnit(name='Limette', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=0.5), RecipeIngredient(title='Ingwer', note=None, unit=RecipeUnit(name='g', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Ingwer', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=5.0), RecipeIngredient(title='Pak Choi', note=None, unit=RecipeUnit(name='g', id=None, description='', fraction=True, abbreviation=''), food=RecipeUnit(name='Pak Choi', id=None, description='', fraction=True, abbreviation=''), disable_amount=True, quantity=100.0)], 'image_url': 'https://d2am1qai33sroc.cloudfront.net/image/63cfb34d520000fc04ff7f95?kptnkey=6q7QNKy-oIgk-IMuWisJ-jfN7s6', 'tags': [RecipeTag(name='kptncook', slug=None, group_id=None, id=None)], 'extras': {'kptncook_id': '63b550d04e00006307850f25', 'source': 'kptncook'}}
grunkohl-salat-mit-knusprigem-halloumi
rote-thai-curry-suppe-mit-reisnudeln-rauchertofu-pak-choi
Created 2 recipes
FXSZ commented 11 months ago

The /recipes/\<recipeid>/assets Folder is empty so is assume there is a Problem with saving the generated image.

in V1.0.0-RC1.1 it looks like this:

Bildschirm­foto 2023-12-22 um 10 53 28
slothful-vassal commented 11 months ago

Hello,

I wish you a happy new year :)

I had the same issue. Because I'm not familiar with python and need a Android app allowing me to push the recipes directly out of KpntCook, I have re-written it as flutter app: kptn_sync. Maybe it can help you.

Regards.

barrio5 commented 10 months ago

bump, same issue here with mealie v1.1.0

alexdetsch commented 9 months ago

Ok, I investigated a little bit. The bug is, that while updating the recipe after uploading all the assets (step-images), we currently don't have the assets-node in our json that gets uploaded. Unfortunately, it seems, that mealie started to want a list of all assets with name and filename and icon. Otherwise it deletes all assets that are not included in that list. So "just" adding a list of all our uploaded assets should fix it. I'll try to write a PR together later today or tomorrow.

Edit: It seems like the aforementioned assets-node is already included in the kptncook-importer, but never filled?

(I just came to this as I stopped the sync-with-mealie-process just in the middle of one recipe, where some of the step-images already where successfully uploaded, but the recipe-json wasn't updated yet. And of course some analysis of the traffic from the webfrontend)

alexdetsch commented 9 months ago

Ok, that seems to was the bug. Works again in my dev-version.

barrio5 commented 9 months ago

This is awesome! Would the already imported recipes with the missing step images also be fixed or do I need to delete them in order for kptncook to sync them properly again? Thanks a lot!

alexdetsch commented 9 months ago

Would the already imported recipes with the missing step images also be fixed or do I need to delete them in order for kptncook to sync them properly again?

You have to delete them and let kptncook reimport them cause the images are being deleted in mealie with the current version and kptncook won't update/overwrite it.

ephes commented 9 months ago

Released 0.0.18 - lets see if it is fixed now :).

barrio5 commented 9 months ago

Works flawlessly now! Thank you guys very much!