From 0bfc86ef8b745cae830a82d854fed19f1b123305 Mon Sep 17 00:00:00 2001 From: GioldDiorld <104082587+GioldDiorld@users.noreply.github.com> Date: Thu, 22 May 2025 17:16:09 +0800 Subject: [PATCH 1/2] Update process_links.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed a bug where the code would mistakenly try to open the working directory as a file if ​​src​​ was empty. --- backend/modelscope_studio/utils/dev/process_links.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/modelscope_studio/utils/dev/process_links.py b/backend/modelscope_studio/utils/dev/process_links.py index 956b85d1..0c1b7f19 100644 --- a/backend/modelscope_studio/utils/dev/process_links.py +++ b/backend/modelscope_studio/utils/dev/process_links.py @@ -52,7 +52,7 @@ def link_transformer(src: str): or src.startswith("data")): return src file_path = str(utils.abspath(src)) - if (not os.path.exists(file_path)): + if (not src or not os.path.exists(file_path)): return src return f"/file={processing_utils.move_resource_to_block_cache(file_path, block)}" From 2cf1502f9c2101d96f5557e8e925fe6c835ba51b Mon Sep 17 00:00:00 2001 From: Col0ring <47329987+Col0ring@users.noreply.github.com> Date: Thu, 22 May 2025 20:35:33 +0800 Subject: [PATCH 2/2] Create smooth-timers-complain.md --- .changeset/smooth-timers-complain.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/smooth-timers-complain.md diff --git a/.changeset/smooth-timers-complain.md b/.changeset/smooth-timers-complain.md new file mode 100644 index 00000000..df21d7db --- /dev/null +++ b/.changeset/smooth-timers-complain.md @@ -0,0 +1,5 @@ +--- +'modelscope_studio': patch +--- + +fix: update process_links.py