diff --git a/neurokit2/data/database.py b/neurokit2/data/database.py index 86aa6c94b5..e8f6db0e9e 100644 --- a/neurokit2/data/database.py +++ b/neurokit2/data/database.py @@ -26,9 +26,9 @@ def download_from_url(url, destination_path=None): # Download the file response = urllib.request.urlopen(url) - if response.status_code == 200: + if response.status == 200: with destination_path.open("wb") as file: - file.write(response.content) + file.write(response.read()) return True else: return False