Skip to content

Commit a9683cf

Browse files
committed
Error from no closing time, turned into a warning
1 parent 8e1b6ad commit a9683cf

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

neo/rawio/neuralynxrawio/nlxheader.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import os
44
import re
55
from collections import OrderedDict
6+
import warnings
67

78

89
class NlxHeader(OrderedDict):
@@ -304,10 +305,11 @@ def readTimeDate(self, txt_header):
304305
if "datetime2_regex" in hpd:
305306
sr = re.search(hpd["datetime2_regex"], txt_header)
306307
if not sr:
307-
raise IOError(
308-
f"No matching header close date/time for application {an} "
309-
+ f"version {av}. Please contact developers."
310-
)
308+
warnings.warn(f"No matching header close date/time for application {an} version {av}. Please contact developers. Downstream behavior may be affected.")
309+
# raise IOError(
310+
# f"No matching header close date/time for application {an} "
311+
# + f"version {av}. Please contact developers."
312+
# )
311313
else:
312314
try:
313315
dt2 = sr.groupdict()

0 commit comments

Comments
 (0)