-
Notifications
You must be signed in to change notification settings - Fork 309
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 when downloading records from the mimic3db database #452
Comments
@Favourj-bit please could you provide code to reproduce the issue? |
Hi @tompollard I just did that. I got the same error when trying to access the 'mimic3wdb-matched', 'MIMIC-III Waveform Database Matched Subset' database |
Thanks for adding the content @Favourj-bit. The code in your example works okay for me. Please could you show me the output to the following code?
A quick fix might be to upgrade to the latest version (e.g. with |
Hi @tompollard |
hi @tompollard, I have tried updating the wfdb but I'm still getting the same error.
|
thanks @Favourj-bit I'll take a look into this as soon as I have the opportunity. There is a problem with the path that is being generated, so you are getting a 404 not found error. Side note, but he MIMIC-III database that you are looking to work with is hosted at: https://physionet.org/content/mimic3wdb/1.0/ |
Hi @tompollard , I wanted to find out if you have been able to look into this |
I'm sorry, not yet. I have some other commitments that I need to focus on, but will take a look at this when I can (if someone doesn't get there before me). |
@Favourj-bit , are you still having trouble with this? I cannot reproduce your problem. The files are downloading properly for me using this code. |
@briangow |
What app are you using? |
I used Jupyter Notebook, could you give it a try? |
ok, i will do that. thanks |
You should be able to simply copy the code and have it work, so I don't think that is the problem. To properly debug this we'd need to inspect I won't be able help with this again until later next week. If you are anxious to get started using the mimic3wdb files, I'd suggest you download them directly from the physionet.org link above. Keep in mind that these files do take a substantial amount of disk space. If you don't need to download them locally I'd suggest reading directly from the database (without saving them locally). See this section in the demo.ipynb for an example on how to do this for the matched subset of MIMIC-III waveforms (https://physionet.org/content/mimic3wdb-matched/1.0/):
|
Hi @briangow Thanks so much for your help. i will check out those functions and ensure to inform you of anything I find out. I will give the code a trial, I will also try to preprocess it if possible. I'll also try to check out methods to get the data locally. Anyways, I won't mind holding on till next week too in case none of the other methods I'll try works out. |
@Favourj-bit This also runs fine for me! Please could you:
|
Hi @tompollard
cwd = os.getcwd() wfdb.dl_database('mimic3wdb-matched', dl_dir=dl_dir) ~\AppData\Roaming\Python\Python37\site-packages\wfdb\io\record.py in dl_database(db_dir, dl_dir, records, annotators, keep_subdirs, overwrite) ~\AppData\Roaming\Python\Python37\site-packages\wfdb\io\record.py in rdheader(record_name, pn_dir, rd_segments) ~\AppData\Roaming\Python\Python37\site-packages\wfdb\io\download.py in _stream_header(file_name, pn_dir) ~\AppData\Roaming\Python\Python37\site-packages\wfdb\io_url.py in read(self, size) ~\AppData\Roaming\Python\Python37\site-packages\wfdb\io_url.py in _read_range(self, start, end) ~\AppData\Roaming\Python\Python37\site-packages\wfdb\io_url.py in init(self, url, start, end) ~\AppData\Roaming\Python\Python37\site-packages\wfdb\io_url.py in _parse_headers(self, method, response) NetFileNotFoundError: 404 Error: Not Found for url: https://physionet.org/files/mimic3wdb-matched/1.0/p00/p000020/.hea |
@Favourj-bit , can you run this from Jupyter Notebook:
please post your output with any error messages. |
@briangow , this code works perfectly. |
Hi @briangow the records in this database i'm trying to access are not just p00/p000020/.hea, so i'm guessing maybe that's where the issue is coming from. |
@Favourj-bit , yes, the path you are seeing ending in /.hea isn't pointing to an actual file which is causing your problem. Given what you need to do I'd suggest the following:
Details about these functions are available at https://wfdb.readthedocs.io/en/latest/index.html . Hopefully the The issue you are having with |
@briangow |
@briangow |
Should be fixed by pull #465. |
This pull request adds a changelog for `v4.2.0`. The changelog is based on the following auto-generated summary of merge commits generated by GitHub: ``` ## What's Changed * bug-fix: Numpy ValueError when cheking empty list equality by @ajadczaksunriselabs in #459 * bug-fix: Pandas set indexing error by @ajadczaksunriselabs in #460 * fix for /issues/452 by @tecamenz in #465 * Use numpydoc to render documentation by @SnoopJ in #472 * build(deps): bump readthedocs-sphinx-search from 0.1.1 to 0.3.2 in /docs by @dependabot in #477 * Update style by @bemoody in #482 * Fix NaN handling in Record.adc, and other fixes by @bemoody in #481 * Set upper bound on Numpy version (numpy = ">=1.10.1,<2.0.0"). Ref #493. by @tompollard in #494 * Update actions to use actions/checkout@v3 and actions/setup-python@v4. by @tompollard in #495 * Fix: Indent code to ensure 'j' is within for-loop in GQRS algorithm by @tompollard in #499 * Add write_dir argument to csv_to_wfdb. Fixes #67. by @tompollard in #492 * Fix warnings by @cbrnr in #502 * README improvements by @bemoody in #503 * Change in type promotion. Fixes to annotation.py by @tompollard in #506 * Use uv by @cbrnr in #504 * Change in type promotion. Fixes to _signal.py by @tompollard in #507 * Test round-trip write/read of supported binary formats by @bemoody in #509 * Corrected typo and extended allowed types for MultiSegmentRecord by @agent3gatech in #514 * Allow expanded physical signal in `calc_adc_params` by @briangow in #512 * Add capability to write signal with unique `samps_per_frame` to `wfdb.io.wrsamp` by @briangow in #510 * Fix selection of channels when converting to EDF by @SamJelfs in #519 * Change in type promotion introduced in Numpy 2.0. Fixes to edf.py. by @tompollard in #527 * Bump dependencies for NumPy 2 compatibility by @cbrnr in #511 * Bump version to v4.2.0 and update notes on creating new releases by @tompollard in #497 ## New Contributors * @ajadczaksunriselabs made their first contribution in #459 * @tecamenz made their first contribution in #465 * @SnoopJ made their first contribution in #472 * @dependabot made their first contribution in #477 * @agent3gatech made their first contribution in #514 * @SamJelfs made their first contribution in #519 **Full Changelog**: v4.1.2...v4.2.0 ```
I'm trying to download records from the mimic3wdb:MIMIC-III Waveform Database using the code given in the demo
But I keep on getting the error shown:

Please how could I solve this?
The text was updated successfully, but these errors were encountered: