Skip to content

[Refactoring] Improve FileNotFoundError message in PointNavDatasetV1 - #2197

Open
anlorla wants to merge 1 commit into
facebookresearch:mainfrom
anlorla:fix-dataset-file-error-msg-0911
Open

[Refactoring] Improve FileNotFoundError message in PointNavDatasetV1#2197
anlorla wants to merge 1 commit into
facebookresearch:mainfrom
anlorla:fix-dataset-file-error-msg-0911

Conversation

@anlorla

@anlorla anlorla commented Sep 11, 2025

Copy link
Copy Markdown

Motivation and Context

When either data_path or scenes_dir is missing, PointNavDatasetV1.get_scenes_to_load raises a FileNotFoundError that only prints the dataset directory.
This can mislead users into focusing on data_path while the real issue is often scenes_dir.

This PR refactors the error message to display both data_path (expanded with split) and scenes_dir to improve debuggability.

How Has This Been Tested

  • Locally set a valid data_path and an invalid scenes_dir; verified the new message includes both paths and clearly indicates the missing one.
  • No functional behavior change; only error text is affected.

Types of changes

  • [Refactoring] Improve clarity of error messages without altering functionality.

Checklist

  • My code follows the code style of this project.
  • I have updated the documentation if required. (N/A)
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (will sign if prompted).
  • I have added tests to cover my changes if required. (N/A, message-only change)

Before / After

Before
FileNotFoundError: Could not find dataset file <dataset_dir>

After

FileNotFoundError: Dataset paths not found.
data_path: <expanded data_path>
scenes_dir: <scenes_dir>```

@meta-cla meta-cla Bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant