Skip to content

Commit

Permalink
Raise RuntimeError to support existing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adriantre committed Jun 29, 2023
1 parent 118ab4f commit a932659
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions torchgeo/datasets/geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,14 @@ def handle_nonlocal_path(self, path: str) -> set[str]:
set of paths pointing to files
Raises:
NotImplementedError: if this method is not overridden by children
RuntimeError: if the path is not found locally,
or this method is not overridden by child
"""
raise NotImplementedError(
"Path was not found locally. If this is a remote file or archive "
raise RuntimeError(
f"Dataset not found in `{path}` "
"either specify a different `root` directory or make sure you "
"have manually downloaded the dataset as instructed in the documentation."
"If this is a remote file or archive "
"please override this method and return the filepath(s) as a set."
)

Expand Down

0 comments on commit a932659

Please sign in to comment.