We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
filepath
download_and_extract
Describe the bug
>>> import monai >>> url = "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/MedNIST.tar.gz" >>> monai.apps.utils.download_and_extract(url, filepath=".") 2022-11-03 15:15:04,858 - INFO - Expected md5 is None, skip md5 check for file .. 2022-11-03 15:15:04,858 - INFO - File exists: ., skipped downloading. 2022-11-03 15:15:04,858 - INFO - Non-empty folder exists in ., skipped extracting. >>> monai.apps.utils.download_and_extract(url, filepath="./test") test: 59.0MB [00:09, 6.22MB/s] 2022-11-03 15:16:23,355 - INFO - Downloaded: test 2022-11-03 15:16:23,356 - INFO - Expected md5 is None, skip md5 check for file test. Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/Documents/MONAI/monai/apps/utils.py", line 313, in download_and_extract extractall(filepath=filename, output_dir=output_dir, file_type=file_type, has_base=has_base) File "/Users/Documents/MONAI/monai/apps/utils.py", line 256, in extractall if cache_dir.exists() and next(cache_dir.iterdir(), None) is not None: File "/usr/local/anaconda3/envs/py38/lib/python3.8/pathlib.py", line 1122, in iterdir for name in self._accessor.listdir(self): NotADirectoryError: [Errno 20] Not a directory: 'test'
it's not easy to set a valid filepath for download_and_extract and the error messages are not very intuitive.
would be great if the argument can be used to cache the downloaded file easily
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
it's not easy to set a valid
filepath
fordownload_and_extract
and the error messages are not very intuitive.would be great if the argument can be used to cache the downloaded file easily
The text was updated successfully, but these errors were encountered: