wfdb.io._url.NetFileNotFoundError: 404 Error: Not Found for url: https://physionet.org/files/ecg-arrhythmia/1.0.0/WFDBRecords/01/010/.hea
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu tại wfdb.dl_database trong wfdb/io/record.py và theo dõi quá trình tải xuống qua wfdb/io/download.py và wfdb/io/_url.py. Tái hiện yêu cầu đối với dataset ecg-arrhythmia và kiểm tra cách WFDBRecords/01/010/ được diễn giải. Hoàn thành khi có thể tải xuống dataset mà không yêu cầu đường dẫn .hea bị thiếu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
import os
import wfdb
for db in wfdb.get_dbs():
print(db)
def download_dataset_from_physionet(dataset_name: str):
# https://wfdb.readthedocs.io/en/latest/io.html#module-1
print(f"Downloading {dataset_name} dataset from PhysioNet...")
if not os.path.exists("physionet"):
os.makedirs("physionet")
if not os.path.exists("physionet/" + dataset_name):
os.makedirs("physionet/" + dataset_name)
wfdb.dl_database(db_dir=dataset_name,
dl_dir=os.path.join(os.getcwd(), "physionet", dataset_name),
records='all',
annotators='all',
keep_subdirs=True,
overwrite=False)
print(f"Downloaded {dataset_name} dataset from PhysioNet!")
# Download the MIT-BIH dataset
download_dataset_from_physionet("mitdb") # This one downloads
# Download the ECG arrhythmia dataset
download_dataset_from_physionet("ecg-arrhythmia") # This one doesn't, see traceback below
...
['ecg-arrhythmia', 'A large scale 12-lead electrocardiogram database for arrhythmia study']
.....
Downloading mitdb dataset from PhysioNet...
Downloading ecg-arrhythmia dataset from PhysioNet...
Generating list of all files for: WFDBRecords/01/010/
Traceback (most recent call last):
File "I:\nasty\Python_Projects\Healthcare\ECG_Classification_Scholarship_Project\main.py", line 27, in <module>
download_dataset_from_physionet("ecg-arrhythmia")
File "I:\nasty\Python_Projects\Healthcare\ECG_Classification_Scholarship_Project\main.py", line 15, in download_dataset_from_physionet
wfdb.dl_database(db_dir=dataset_name,
File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\wfdb\io\record.py", line 3065, in dl_database
record = rdheader(
^^^^^^^^^
File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\wfdb\io\record.py", line 1847, in rdheader
header_content = download._stream_header(file_name, pn_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\wfdb\io\download.py", line 109, in _stream_header
content = f.read()
^^^^^^^^
File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\wfdb\io\_url.py", line 581, in read
result = b"".join(self._read_range(start, end))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\wfdb\io\_url.py", line 474, in _read_range
with RangeTransfer(self._current_url, req_start, req_end) as xfer:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\wfdb\io\_url.py", line 168, in __init__
self._parse_headers(method, self._response)
File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\wfdb\io\_url.py", line 214, in _parse_headers
raise cls(
wfdb.io._url.NetFileNotFoundError: 404 Error: Not Found for url: https://physionet.org/files/ecg-arrhythmia/1.0.0/WFDBRecords/01/010/.hea
Seems to be trying to find a filename that doesn't exist? When you navigate to https://physionet.org/files/ecg-arrhythmia/1.0.0/WFDBRecords/01/010 there are files in there, but the code is looking for .hea which doesn't exist?
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 853
- Fork
- 322
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MIT-LCP/wfdb-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
MIT-LCP/wfdb-python#572 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
MIT-LCP/wfdb-python#568 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
MIT-LCP/wfdb-python#557 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 58/100
MIT-LCP/wfdb-python#554 ·
-
WFDB path ignoredĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
MIT-LCP/wfdb-python#545 ·
Tất cả issue của MIT-LCP/wfdb-python
Issue tương tự
-
type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
JoshuaKGoldberg/emoji-platform-data#1113 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
tardis-sn/tardis#3752 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
deepset-ai/haystack#13074 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
langflow-ai/langflow#15510 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:analytics bug effort:S level:L3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
mczielinski/ob-analytics#314 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày