上传数据集后,在 commit 阶段报错 `requests.exceptions.JSONDec`

在调用 python 接口 api.upload_folder() 上传完数据集后,在 commit 阶段,报错:

Committing folder to JoeyL1n/beyondRGB ...
Traceback (most recent call last):
  File "/Users/joeylin/Library/Python/3.9/lib/python/site-packages/requests/models.py", line 976, in json
    return complexjson.loads(self.text, **kwargs)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/joeylin/code/beyondrgb/upload_dataset.py", line 10, in <module>
    api.upload_folder(
  File "/Users/joeylin/Library/Python/3.9/lib/python/site-packages/modelscope/hub/api.py", line 1819, in upload_folder
    commit_info: CommitInfo = self.create_commit(
  File "/Users/joeylin/Library/Python/3.9/lib/python/site-packages/modelscope/hub/api.py", line 1597, in create_commit
    resp = response.json()
  File "/Users/joeylin/Library/Python/3.9/lib/python/site-packages/requests/models.py", line 980, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

请问如何解决?

展开
收起
JoeyLin 2025-08-12 20:20:03 33 分享 版权
0 条回答
写回答
取消 提交回答

包含图像分类、图像生成、人体人脸识别、动作识别、目标分割、视频生成、卡通画、视觉评价、三维视觉等多个领域

热门讨论

热门文章

还有其他疑问?
咨询AI助理