Skip to content

Commit

Permalink
Fix FileNotFoundError when download bundle (#8076)
Browse files Browse the repository at this point in the history
Fixes #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>
  • Loading branch information
KumoLiu authored Sep 10, 2024
1 parent d02ba11 commit 64eee8c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions monai/bundle/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ def _download_from_ngc_private(
else:
raise ValueError("NGC API requires requests package. Please install it.")

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

0 comments on commit 64eee8c

Please sign in to comment.