mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-16 08:17:45 +01:00
Fix: add error log for validate_blob and upload_blob (#1482)
This commit is contained in:
@@ -2154,8 +2154,9 @@ class HubApi:
|
||||
else:
|
||||
raise ValueError('Invalid data type to upload')
|
||||
|
||||
raise_for_http_status(rsp=response)
|
||||
resp = response.json()
|
||||
raise_on_error(resp)
|
||||
raise_on_error(rsp=resp)
|
||||
|
||||
res_d['url'] = upload_object['url']
|
||||
res_d['status_code'] = resp['Code']
|
||||
@@ -2208,8 +2209,9 @@ class HubApi:
|
||||
cookies=cookies
|
||||
)
|
||||
|
||||
raise_for_http_status(rsp=response)
|
||||
resp = response.json()
|
||||
raise_on_error(resp)
|
||||
raise_on_error(rsp=resp)
|
||||
|
||||
upload_objects = [] # list of objects to upload, [{'url': 'xxx', 'oid': 'xxx'}, ...]
|
||||
resp_objects = resp['Data']['objects']
|
||||
|
||||
Reference in New Issue
Block a user