From f4f34ea9150d0ca9ff5944aa97a206454d58a942 Mon Sep 17 00:00:00 2001 From: Diego Morientez Date: Thu, 22 Aug 2024 16:21:07 -0600 Subject: [PATCH] Update file_utils.py request.head also require use url_proxies variable --- flair/file_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flair/file_utils.py b/flair/file_utils.py index f7f20a20f3..7a0118822b 100644 --- a/flair/file_utils.py +++ b/flair/file_utils.py @@ -239,7 +239,7 @@ def get_from_cache(url: str, cache_dir: Path) -> Path: return cache_path # make HEAD request to check ETag - response = requests.head(url, headers={"User-Agent": "Flair"}, allow_redirects=True) + response = requests.head(url, headers={"User-Agent": "Flair"}, allow_redirects=True, proxies=url_proxies) if response.status_code != 200: raise OSError(f"HEAD request failed for url {url} with status code {response.status_code}.")