From 77a8b355cd15fe878a03f2a1d5e928df2b13c76f Mon Sep 17 00:00:00 2001 From: Lucas McCullum Date: Thu, 20 Aug 2020 12:32:30 -0400 Subject: [PATCH] Fixes erroneous URL #247 Fixes URL generation for Windows machines by removing the os.sep operation. Fixes #247. --- wfdb/io/download.py | 2 +- wfdb/io/record.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wfdb/io/download.py b/wfdb/io/download.py index 832bf738..94923b08 100644 --- a/wfdb/io/download.py +++ b/wfdb/io/download.py @@ -513,7 +513,7 @@ def dl_files(db, dl_dir, files, keep_subdirs=True, overwrite=False): """ # Full url PhysioNet database db_dir = posixpath.join(db, record.get_version(db)) - db_url = posixpath.join(PN_CONTENT_URL, db_dir) + os.sep + db_url = posixpath.join(PN_CONTENT_URL, db_dir) + '/' # Check if the database is valid response = requests.get(db_url) diff --git a/wfdb/io/record.py b/wfdb/io/record.py index 171041b3..1d65da4a 100644 --- a/wfdb/io/record.py +++ b/wfdb/io/record.py @@ -3381,7 +3381,7 @@ def dl_database(db_dir, dl_dir, records='all', annotators='all', db_dir = posixpath.join(dir_list[0], get_version(dir_list[0]), *dir_list[1:]) else: db_dir = posixpath.join(db_dir, get_version(db_dir)) - db_url = posixpath.join(download.PN_CONTENT_URL, db_dir) + os.sep + db_url = posixpath.join(download.PN_CONTENT_URL, db_dir) + '/' # Check if the database is valid r = requests.get(db_url) r.raise_for_status()