Skip to content

Commit eb5db9d

Browse files
authored
Fix resumable download error (#865)
1 parent 4edc26c commit eb5db9d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/kaggle/api/kaggle_api_extended.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2672,11 +2672,11 @@ def download_file(self, response, outfile, http_client, quiet=True, resume=False
26722672
)
26732673

26742674
request_history = response.history[0]
2675-
response = http_client.call(
2675+
response = requests.request(
26762676
request_history.request.method,
2677-
request_history.headers["location"],
2677+
response.url,
26782678
headers={"Range": "bytes=%d-" % (size_read,)},
2679-
_preload_content=False,
2679+
stream=True,
26802680
)
26812681

26822682
with tqdm(total=size, initial=size_read, unit="B", unit_scale=True, unit_divisor=1024, disable=quiet) as pbar:

0 commit comments

Comments
 (0)