Skip to content

Commit aa05971

Browse files
committed
Guarantee parent folder exists before writing image
1 parent 23db15f commit aa05971

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/napari_deeplabcut/_writer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def write_hdf(filename, data, metadata):
8282

8383

8484
def _write_image(data, output_path, plugin=None):
85+
Path(output_path).parent.mkdir(parents=True, exist_ok=True)
8586
imsave(
8687
output_path,
8788
img_as_ubyte(data).squeeze(),

0 commit comments

Comments
 (0)