diff --git a/tests/utils/kagglehub.py b/tests/utils/kagglehub.py index a6250e29..126672ad 100644 --- a/tests/utils/kagglehub.py +++ b/tests/utils/kagglehub.py @@ -26,8 +26,10 @@ def do_GET(self): path = m.group(2) filepath = f"/input/tests/data/kagglehub/models/{model_handle}/{path}" if not os.path.isfile(filepath): - self.send_response(404) - self.end_headers() + self.send_error(404, "Internet is disabled in our tests " + "kagglehub uses a fake API server " + f"Use `kagglehub.model_download('{model_handle}', path='{path}')` to download the missing file " + f"and copy it to `./docker-python/tests/data/kagglehub/models/{model_handle}/{path}`.") return with open(filepath, "rb") as f: