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

Database download fails on windows #247

Closed
dsst95 opened this issue Jul 29, 2020 · 2 comments · Fixed by #251
Closed

Database download fails on windows #247

dsst95 opened this issue Jul 29, 2020 · 2 comments · Fixed by #251
Assignees
Labels

Comments

@dsst95
Copy link

dsst95 commented Jul 29, 2020

If i try on windows run a database download with something like that:

import wfdb
import os

wfdb.dl_database('ahadb', os.path.join('C:', 'db'))

I get a 404 error because a \ is always added at the end of url as %5C, what is the path separator url encoded, which gets wrongly added to the url here: https://github.com/MIT-LCP/wfdb-python/blob/master/wfdb/io/record.py#L3384

@dsst95
Copy link
Author

dsst95 commented Jul 30, 2020

It would also be good if the csv-Files that contains classification information (for example REFERENCE-SQI.csv in the challenge-2016/training-a db which contains additional classification, which isn't included in the wfdb-headers) would be downloaded with this command.

@Lucas-Mc
Copy link
Collaborator

Hey @dennis95stumm, thanks for posting this! Yeah it looks like a silly mistake on my end when switching from Physiobank to PhysioNet that wasn't caught since it was being tested on Linux and OSX (Windows is weird) so I'll post the fix soon!

Downloading the CSV files and other files seems out of the scope of this package since it is only meant to extract the WFDB-compatible files such as RECORDS, ANNOTATORS, .dat, .hea, etc. If you wish to download all the files, you should use the wget command or one of the other options from the PhysioNet website, thanks!

@Lucas-Mc Lucas-Mc self-assigned this Jul 30, 2020
@Lucas-Mc Lucas-Mc added the bug label Jul 30, 2020
Lucas-Mc added a commit that referenced this issue Aug 20, 2020
Fixes URL generation for Windows machines by removing the os.sep operation. Fixes #247.
Lucas-Mc added a commit that referenced this issue Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants