We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9e5fc2 commit f3d98b3Copy full SHA for f3d98b3
elements_ephys/readers/spikeglx.py
@@ -37,7 +37,11 @@ def __init__(self, root_dir):
37
38
self.root_dir = pathlib.Path(root_dir)
39
40
- meta_filepath = next(pathlib.Path(root_dir).glob('*.ap.meta'))
+ try:
41
+ meta_filepath = next(pathlib.Path(root_dir).glob('*.ap.meta'))
42
+ except StopIteration:
43
+ raise FileNotFoundError(f'No SpikeGLX file (.ap.meta) found at: {root_dir}')
44
+
45
self.root_name = meta_filepath.name.replace('.ap.meta', '')
46
47
@property
0 commit comments