Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error messages when reading .ecg file using PyECG packages #4

Open
vic22981106 opened this issue Jul 15, 2020 · 0 comments
Open

Error messages when reading .ecg file using PyECG packages #4

vic22981106 opened this issue Jul 15, 2020 · 0 comments

Comments

@vic22981106
Copy link

vic22981106 commented Jul 15, 2020

I was trying to read .ecg files from these 2 databases:

normal sinus rhythm RR interval database

congestive heart failure RR interval database

I've searched the Internet for a while and the only answer I got was to use the pyECG packages to read these .ecg files. But when I tried this code down below,
from pyecg import ECGRecord
ecg_path = "C:\\Users\\vince\\Desktop\\ECG database\\normal-sinus-rhythm-rr-interval-database-1.0.0\\nsr001.ecg"
record = ECGRecord.from_ishine(ecg_path)

error messages popped up!
Traceback (most recent call last):
File "<pyshell#16>", line 1, in <module>
record = ECGRecord.from_ishine(ecg_path)
File "C:\Users\vince\AppData\Local\Programs\Python\Python36\lib\site-packages\pyecg\ecg.py", line 168, in from_ishine return loader.load(ecg_file)
File "C:\Users\vince\AppData\Local\Programs\Python\Python36\lib\site-packages\pyecg\importers\ishine.py", line 68, in load record = Holter(ecg_file, check_valid=False)
File "C:\Users\vince\AppData\Local\Programs\Python\Python36\lib\site-packages\ishneholterlib\__init__.py", line 65, in __init__ self.load_header()
File "C:\Users\vince\AppData\Local\Programs\Python\Python36\lib\site-packages\ishneholterlib\__init__.py", line 123, in load_header self.var_block = get_val(filename, 522, 'a'+str(self.var_block_size)).split(b'\x00')[0]
File "C:\Users\vince\AppData\Local\Programs\Python\Python36\lib\site-packages\ishneholterlib\__init__.py", line 20, in get_val val = val[0]
IndexError: index 0 is out of bounds for axis 0 with size 0

By the way, the ecg file was download from the physionet database : Normal Sinus Rhythm RR Interval Database

I don't know what was going on when I got this error message. Can someone help me out?
Or is there any other package that I can use for the same purpose?

@vic22981106 vic22981106 changed the title Error messages when read .ecg file using PyECG packages Error messages when reading .ecg file using PyECG packages Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant