NWB files organized on Windows can end up with backslash separators in external_file paths (e.g. ses-1_image\abc123_external_file_0.mp4). This happens because dandi organize was using os.path.join to build these paths, which produces backslashes on Windows. A fix is in progress at dandi/dandi-cli#1832.
However, NWB files with this problem already exist on the archive (e.g. Dandiset 001771), and the issue could reappear from other tools that construct external_file paths using platform-dependent path joining.
The existing check_image_series_external_file_relative already validates that paths are not absolute, using both PureWindowsPath and PurePosixPath. A similar check could flag external_file values that contain backslashes, since DANDI asset keys always use forward slashes and backslash paths will silently fail when resolved against the archive.
For context, this caused get_dandi_video_info() to return empty results for Dandiset 001771, as reported in catalystneuro/nwb-video-widgets#33.
NWB files organized on Windows can end up with backslash separators in
external_filepaths (e.g.ses-1_image\abc123_external_file_0.mp4). This happens becausedandi organizewas usingos.path.jointo build these paths, which produces backslashes on Windows. A fix is in progress at dandi/dandi-cli#1832.However, NWB files with this problem already exist on the archive (e.g. Dandiset 001771), and the issue could reappear from other tools that construct
external_filepaths using platform-dependent path joining.The existing
check_image_series_external_file_relativealready validates that paths are not absolute, using bothPureWindowsPathandPurePosixPath. A similar check could flagexternal_filevalues that contain backslashes, since DANDI asset keys always use forward slashes and backslash paths will silently fail when resolved against the archive.For context, this caused
get_dandi_video_info()to return empty results for Dandiset 001771, as reported in catalystneuro/nwb-video-widgets#33.