Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

下载 glm4-chat 提示 Distant resource does not have a Content-Length #1694

Open
502647092 opened this issue Jun 22, 2024 · 1 comment
Open
Labels
question Further information is requested
Milestone

Comments

@502647092
Copy link

用 HF-MIRROR 下载 glm4-chat 提示 Distant resource does not have a Content-Length 换成 HF官方源挂梯子也是这个问题 删了重新下载了好几次了 下载速度是跑满的 就是下载到最后就报错了 麻烦问下是什么问题

2024-06-22 03:17:56,351 xinference.core.worker 346 ERROR    Failed to load model glm4-chat-1-0
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1754, in _get_metadata_or_catch_error
    raise FileMetadataError("Distant resource does not have a Content-Length.")
huggingface_hub.utils._errors.FileMetadataError: Distant resource does not have a Content-Length.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/xinference/model/utils.py", line 104, in retry_download
    return download_func(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/_snapshot_download.py", line 294, in snapshot_download
    thread_map(
  File "/opt/conda/lib/python3.10/site-packages/tqdm/contrib/concurrent.py", line 69, in thread_map
    return _executor_map(ThreadPoolExecutor, fn, *iterables, **tqdm_kwargs)
  File "/opt/conda/lib/python3.10/site-packages/tqdm/contrib/concurrent.py", line 51, in _executor_map
    return list(tqdm_class(ex.map(fn, *iterables, chunksize=chunksize), **kwargs))
  File "/opt/conda/lib/python3.10/site-packages/tqdm/std.py", line 1178, in __iter__
    for obj in iterable:
  File "/opt/conda/lib/python3.10/concurrent/futures/_base.py", line 621, in result_iterator
    yield _result_or_cancel(fs.pop())
  File "/opt/conda/lib/python3.10/concurrent/futures/_base.py", line 319, in _result_or_cancel
    return fut.result(timeout)
  File "/opt/conda/lib/python3.10/concurrent/futures/_base.py", line 458, in result
    return self.__get_result()
  File "/opt/conda/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/opt/conda/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/_snapshot_download.py", line 268, in _inner_hf_hub_download
    return hf_hub_download(
  File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1221, in hf_hub_download
    return _hf_hub_download_to_cache_dir(
  File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1325, in _hf_hub_download_to_cache_dir
    _raise_on_head_call_error(head_call_error, force_download, local_files_only)
  File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1826, in _raise_on_head_call_error
    raise LocalEntryNotFoundError(
@502647092 502647092 added the question Further information is requested label Jun 22, 2024
@XprobeBot XprobeBot added this to the v0.12.2 milestone Jun 22, 2024
@502647092
Copy link
Author

我加了调试代码看了看 发现请求之后返回的 Header 头 没有包含 Content-Length

{'Accept-Ranges': 'bytes', 'Access-Control-Allow-Origin': 'https://hf-mirror.com', 'Access-Control-Expose-Headers': 'X-Repo-Commit,X-Request-Id,X-Error-Code,X-Error-Message,X-Total-Count,ETag,Link,Accept-Ranges,Content-Range', 'Alt-Svc': 'h3=":443"; ma=2592000', 'Content-Disposition': 'inline; filename*=UTF-8\'\'modeling_chatglm.py; filename="modeling_chatglm.py";', 'Content-Security-Policy': 'default-src none; sandbox', 'Content-Type': 'text/plain; charset=utf-8', 'Cross-Origin-Opener-Policy': 'same-origin', 'Date': 'Sat, 22 Jun 2024 06:23:11 GMT', 'Etag': '"a68356c3af344abac97091166efbe662c1ea3cee"', 'Referrer-Policy': 'strict-origin-when-cross-origin', 'Server': 'hf-mirror', 'Vary': 'Origin', 'Via': '1.1 a2a18b761c57d2eb35b02af9e68b39ec.cloudfront.net (CloudFront)', 'X-Amz-Cf-Id': 'cRbXtSiPhe4E6c9SQaEk-ikXhb7bGfXuatzQGbx4JlchzsrDBymLzw==', 'X-Amz-Cf-Pop': 'NRT12-P2', 'X-Cache': 'Miss from cloudfront', 'X-Powered-By': 'huggingface-moon', 'X-Repo-Commit': 'b84dc74294ccd507a3d78bde8aebf628221af9bd', 'X-Request-Id': 'Root=1-66766dcf-3a5484033c8236e943a57ed0;0a166ee1-bf8a-451b-8995-bc0c81ff3636'}
HfFileMetadata(commit_hash='b84dc74294ccd507a3d78bde8aebf628221af9bd', etag='a68356c3af344abac97091166efbe662c1ea3cee', location='https://hf-mirror.com/THUDM/glm-4-9b-chat/resolve/b84dc74294ccd507a3d78bde8aebf628221af9bd/modeling_chatglm.py', size=None)

请问这个是镜像站的问题 还是什么问题导致的

@XprobeBot XprobeBot modified the milestones: v0.12.2, v0.12.4 Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants