You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gradio is unable to fetch a file from the specified path because it is not within the working directory of the Gradio app or it is not a temporary file created by the app.
#4118
The image after running is cracked and the preview image cannot be seen
{"error":"HTTPException","detail":"File cannot be fetched: D:/File/fl/2023-05-09/00004-1710112629.png. All files must contained within the Gradio python app working directory, or be a temp file created by the Gradio python app.","body":"","errors":"(403, 'File cannot be fetched: D:/File/fl/2023-05-09/00004-1710112629.png. All files must contained within the Gradio python app working directory, or be a temp file created by the Gradio python app.')"}
{"error":"HTTPException","detail":"File cannot be fetched: D:/File/新建文件夹/2023-05-09/00004-1710112629.png. All files must contained within the Gradio python app working directory, or be a temp file created by the Gradio python app.","body":"","errors":"(403, 'File cannot be fetched: D:/File/新建文件夹/2023-05-09/00004-1710112629.png. All files must contained within the Gradio python app working directory, or be a temp file created by the Gradio python app.')"}
System Info
gradio: 3.28.1
Win11
edge
Severity
annoying
The text was updated successfully, but these errors were encountered:
Hi @wzgrx ! That's intended behavior. There's an allowed_paths argument to gr.Blocks(), e.g. gr.Blocks(allowed_paths=['D:/File/fl/'], that will allow the server to serve apps from directories not created by it.
Describe the bug
The image after running is cracked and the preview image cannot be seen
{"error":"HTTPException","detail":"File cannot be fetched: D:/File/fl/2023-05-09/00004-1710112629.png. All files must contained within the Gradio python app working directory, or be a temp file created by the Gradio python app.","body":"","errors":"(403, 'File cannot be fetched: D:/File/fl/2023-05-09/00004-1710112629.png. All files must contained within the Gradio python app working directory, or be a temp file created by the Gradio python app.')"}
Is there an existing issue for this?
Reproduction
96c17a7
Screenshot
Logs
System Info
Severity
annoying
The text was updated successfully, but these errors were encountered: