From 47c11ab2fad0642a1782464bf650cc2fa9a86d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=A9=E7=80=9A=E7=8C=AB?= Date: Mon, 19 Aug 2024 17:51:36 +0900 Subject: [PATCH] fix gdrive_url pytest error --- easyidp/data.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/easyidp/data.py b/easyidp/data.py index 07d8a0e..d44e022 100644 --- a/easyidp/data.py +++ b/easyidp/data.py @@ -296,7 +296,7 @@ def __init__(self, name="", gdrive_url="", size="",): """ self.name = name - self.grive_url = gdrive_url + self.gdrive_url = gdrive_url self.size = size self.data_dir = user_data_dir(self.name) self.zip_file = user_data_dir(self.name + ".zip") @@ -347,13 +347,13 @@ def _download_data(self): import gdown # google drive gdown_test.zip file is accessable # then try according google drive download link - if url_checker(self.grive_url): - output = gdown.download(url=self.grive_url, output=str(self.zip_file), quiet=False, fuzzy=True) + if url_checker(self.gdrive_url): + output = gdown.download(url=self.gdrive_url, output=str(self.zip_file), quiet=False, fuzzy=True) else: # user can access Google Drive but maybe dataset zip file is missing, no waste AliYun OSS resource # just mention user to double check google drive access raise ConnectionError( - f"Could not access google download link for dataset {self.name} from: \n{self.grive_url}.\n" + f"Could not access google download link for dataset {self.name} from: \n{self.gdrive_url}.\n" f"Please contact the maintainer via github if above link is broken." ) else: