Skip to content

Commit 64eee8c

Browse files
authored
Fix FileNotFoundError when download bundle (Project-MONAI#8076)
Fixes Project-MONAI#8075 ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
1 parent d02ba11 commit 64eee8c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

monai/bundle/scripts.py

+1
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ def _download_from_ngc_private(
255255
else:
256256
raise ValueError("NGC API requires requests package. Please install it.")
257257

258+
os.makedirs(download_path, exist_ok=True)
258259
zip_path = download_path / f"{filename}_v{version}.zip"
259260
with open(zip_path, "wb") as f:
260261
f.write(response.content)

0 commit comments

Comments
 (0)