-
-
Notifications
You must be signed in to change notification settings - Fork 779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] - Cannot Download Recipe(s) #3095
Comments
Can confirm, download seems to be broken @tumtumsback in the meantime before we issue a fix for that. If your mealie instance is public your friend should be able to scrape your recipe of your mealie with his mealie instance. If not public, i am pretty sure this should work with share links as well |
Thanks for confirming so quick, you guys are amazing. @Kuchenpirat I can confirm that using a share link from one Mealie instance and importing on another worked - the only thing that did not scrape and come over was the image file. I will watch this issue and use the workaround for now. |
Looked into this briefly.. Definitely don't have the full picture in my head as yet. The path
Which is almost certainly getting called from here: mealie/mealie/routes/recipe/recipe_crud_routes.py Lines 117 to 133 in 2926726
I haven't looked into how all the 3rd party libraries operate, though I note the error log seems to be using starlette a lot. |
Last thing I'll add for now..
This is an output of the variables immediately before this line.. I'm assuming it could be relevant/useful in some way.
Need to look into the FileResponse call, and also whether the write methods of the ZipFile class have actually done something. |
I did a bit of debugging on this.
Part one of the issue is mealie/mealie/core/dependencies/dependencies.py Lines 208 to 215 in ee87a14
Which means when The I did some hacking and can empirically say that the file exists during We're going to need to find some other way to clean up the zip file. I expect we're going to have to lean on whatever causes data exports to expire, but I just started looking at the code, so I don't know what that is yet. |
Both
The other three endpoints use The easiest thing would be to create a version of Refs: |
First Check
What is the issue you are experiencing?
When I click on 'Download' on a recipe, it does nothing. I wanted to download a Mealie recipe, and give the ZIP to a friend, so that they could import the ZIP into their Mealie, but it just won't download.
Steps to Reproduce
Please provide relevant logs
INFO: 192.168.29.230:59323 - "POST /api/recipes/shrimp-fettuccine-alfredo/exports HTTP/1.1" 200 OK
INFO: 192.168.29.230:59323 - "GET /api/recipes/shrimp-fettuccine-alfredo/exports/zip?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbHVnIjoic2hyaW1wLWZldHR1Y2NpbmUtYWxmcmVkbyIsImV4cCI6MTcwNjgwOTkxNX0.sLcmPW4e1l60K2LSy1gEqEUCvdnFx4I-x7OuhsKTDK0 HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/responses.py", line 323, in call
stat_result = await anyio.to_thread.run_sync(os.stat, self.path)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/opt/pysetup/.venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
FileNotFoundError: [Errno 2] No such file or directory: '/app/data/.temp/my_zip_archive.zip'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 419, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/applications.py", line 123, in call
await self.middleware_stack(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in call
raise exc
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in call
await self.app(scope, receive, _send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 24, in call
await responder(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 44, in call
await self.app(scope, receive, self.send_with_gzip)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 762, in call
await self.middleware_stack(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 782, in app
await route.handle(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 297, in handle
await self.app(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 77, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 75, in app
await response(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/responses.py", line 326, in call
raise RuntimeError(f"File at path {self.path} does not exist.")
RuntimeError: File at path /app/data/.temp/my_zip_archive.zip does not exist.
Mealie Version
Details
Version: v1.1.0
Build:
Application Mode: Production
Demo Status: Not Demo
API Port: 9000
API Docs: Enabled
Database Type: sqlite
Recipe Scraper Version: 14.53.0
Checks
Secure Site: Yes
Server Side Base URL: Yes
LDAP Ready: No
Email Configured: No
Docker Volumes: error
Deployment
Docker (Linux)
Additional Deployment Details
No response
The text was updated successfully, but these errors were encountered: