mirror of
https://github.com/clearml/clearml
synced 2025-02-07 13:23:40 +00:00
Show better error when failing to download an artifact
This commit is contained in:
parent
3fce450250
commit
70de28ce7b
@ -1207,7 +1207,7 @@ class _HttpDriver(_Driver):
|
|||||||
obj.url, timeout=(int(self.timeout_connection), int(self.timeout_total)),
|
obj.url, timeout=(int(self.timeout_connection), int(self.timeout_total)),
|
||||||
headers=container.get_headers(obj.url))
|
headers=container.get_headers(obj.url))
|
||||||
if res.status_code != requests.codes.ok:
|
if res.status_code != requests.codes.ok:
|
||||||
raise ValueError('Failed getting object %s (%d): %s' % (obj.object_name, res.status_code, res.text))
|
raise ValueError('Failed getting object %s (%d): %s' % (obj.object_name, res.status_code, res.reason))
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def download_object_as_stream(self, obj, chunk_size=64 * 1024, **_):
|
def download_object_as_stream(self, obj, chunk_size=64 * 1024, **_):
|
||||||
|
Loading…
Reference in New Issue
Block a user