From a87a885ccd3221fda93d3f1c3a37c754ba64403e Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 31 Jan 2021 14:54:58 +0100 Subject: [PATCH] Don't use Path object to return fileresponses --- freqtrade/rpc/api_server/web_ui.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/freqtrade/rpc/api_server/web_ui.py b/freqtrade/rpc/api_server/web_ui.py index 6d397da56..4876c9077 100644 --- a/freqtrade/rpc/api_server/web_ui.py +++ b/freqtrade/rpc/api_server/web_ui.py @@ -22,10 +22,10 @@ async def index_html(rest_of_path: str): raise HTTPException(status_code=404, detail="Not Found") uibase = Path(__file__).parent / 'ui' if (uibase / rest_of_path).is_file(): - return FileResponse(uibase / rest_of_path) + return FileResponse(str(uibase / rest_of_path)) index_file = uibase / 'index.html' if not index_file.is_file(): - return FileResponse(uibase / 'fallback_file.html') + return FileResponse(str(uibase / 'fallback_file.html')) # Fall back to index.html, as indicated by vue router docs - return FileResponse(index_file) + return FileResponse(str(index_file))