You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HeaderSyntaxError encountered when using wfdb 3.4.1 #351
I encountered a HeaderSyntaxError when using wfdb 3.4.1, which will not happen when using wfdb 3.2.0. The following is the screenshot
The content of this file is as follows as a string:
@wenh06 thank you for alerting us to this issue! You are absolutely correct, the positions for the date and time in the record line were swapped and the date used -'s instead of /'s along with the name of the month instead of an integer.
Our understanding is that these files were not created with the WFDB tools provided by PhysioNet which is likely why these erroneous headers were created. Having said that, we are also looking to improve checks for this kind of problem in the WFDB tools as discussed in: #415 .
Activity
wenh06 commentedon Mar 26, 2022
The differences between the


_parse_signal_linesfunction inwfdb.io._headerbetween version 3.4.1 (red color) and 3.2.0 are as followswenh06 commentedon Mar 26, 2022
I think I've found the problem. The first line of the header file is illegal.
should be
or at least
which would not trigger this error.
briangow commentedon Aug 5, 2022
@wenh06 thank you for alerting us to this issue! You are absolutely correct, the positions for the date and time in the record line were swapped and the date used -'s instead of /'s along with the name of the month instead of an integer.
Our understanding is that these files were not created with the WFDB tools provided by PhysioNet which is likely why these erroneous headers were created. Having said that, we are also looking to improve checks for this kind of problem in the WFDB tools as discussed in: #415 .
The incorrect headers have been fixed in the most recent version of this project: https://physionet.org/content/challenge-2021/1.0.3/ . For reproducibility, copies of the erroneous headers should still be available via the links to the datasets in: https://physionet.org/content/challenge-2021/1.0.2/ .
However, I am not able to reproduce the error message you got, even with wfdb==3.4.1 . Please see #415 for further discussion on this topic.