From b051085de77b3a64168cfddfeaa0ddeb54d4f9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Varej=C3=A3o?= Date: Sun, 7 Dec 2025 22:58:02 -0300 Subject: [PATCH] fix: Change os.rename by shutil.move `os.rename` only works if source and destination are on the same file system. Therefore, `shutil.move` should be used instead. --- sampleid/inference.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sampleid/inference.py b/sampleid/inference.py index fbc095f..c7b6318 100644 --- a/sampleid/inference.py +++ b/sampleid/inference.py @@ -1,5 +1,6 @@ import os import sys +import shutil import tempfile from urllib.request import urlopen from tqdm import tqdm @@ -35,7 +36,7 @@ def download_file(url: str, path: str): tmp.flush() os.fsync(tmp.fileno()) - os.replace(tmp.name, path) + shutil.move(tmp.name, path) print(f"Downloaded to: {path}")