MIT-LCP / MIT-LCP/wfdb-python

Errors in `get_record_list`

Open
#304 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
853
Forks
322
PR merge metrics
No merged PRs in 30d

Description

import wfdb
print(wfdb.get_record_list("antimicrobial-resistance-uti")) # The 7th database from get_dbs()

Rather than returning a list of records, it returns a list of lines of a 403 Error HTML file.

['<!DOCTYPE html>', '', '<html lang="en">', ' <head>', ' <meta charset="UTF-8">', ' <title>', '403: Forbidden Access', '</title>', ... , '</html>']

Beyond either removing, renaming or fixing the dbname. I would also recommend detecting that the file accessed is an Error Page and not a valid list of records and raise a corresponding Python Error.

Also:
print(wfdb.get_record_list("bhx-brain-bounding-box")) # The 9th database from get_dbs()

Raises a Value Error:
ValueError: The database https://physionet.org/files/bhx-brain-bounding-box/1.1 has no WFDB files to download

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the get_record_list entry point and reproduce the antimicrobial-resistance-uti and bhx-brain-bounding-box examples from the issue. Trace how the database response is parsed, then verify that valid databases return record names while an HTML error page or a database without WFDB files produces a corresponding Python error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.