vkzyouknowwhat 2025-01-10 16:25 采纳率: 0%
浏览 65

FileNotFoundError : [Errno 2] No such file or directory:

windows cmd 运行以下代码报错
实际在gigapose的项目中运行python -m src.scripts.download_default_detections也是同样的结果,环境变量和国内镜像网站也设置了,但也无济于事,有没有uu知道怎么解决阿?

huggingface-cli download bop-benchmark/datasets --include default_detections/*  --cache-dir ./dataset --local-dir ./ --local-dir-use-symlinks False --repo-type=dataset

img

报错信息:

Fetching 34 files:   6%|███▊                                                            | 2/34 [00:00<00:10,  3.00it/s]
Traceback (most recent call last):
  File "F:\software\Anaconda\envs\gigapose\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "F:\software\Anaconda\envs\gigapose\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "F:\software\Anaconda\envs\gigapose\Scripts\huggingface-cli.exe\__main__.py", line 7, in <module>
  File "F:\software\Anaconda\envs\gigapose\lib\site-packages\huggingface_hub\commands\huggingface_cli.py", line 57, in main
    service.run()
  File "F:\software\Anaconda\envs\gigapose\lib\site-packages\huggingface_hub\commands\download.py", line 153, in run
    print(self._download())  # Print path to downloaded files
  File "F:\software\Anaconda\envs\gigapose\lib\site-packages\huggingface_hub\commands\download.py", line 187, in _download
    return snapshot_download(
  File "F:\software\Anaconda\envs\gigapose\lib\site-packages\huggingface_hub\utils\_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "F:\software\Anaconda\envs\gigapose\lib\site-packages\huggingface_hub\_snapshot_download.py", line 296, in snapshot_download
    thread_map(
  File "F:\software\Anaconda\envs\gigapose\lib\site-packages\tqdm\contrib\concurrent.py", line 69, in thread_map
    return _executor_map(ThreadPoolExecutor, fn, *iterables, **tqdm_kwargs)
  File "F:\software\Anaconda\envs\gigapose\lib\site-packages\tqdm\contrib\concurrent.py", line 51, in _executor_map
    return list(tqdm_class(ex.map(fn, *iterables, chunksize=chunksize), **kwargs))
  File "F:\software\Anaconda\envs\gigapose\lib\site-packages\tqdm\std.py", line 1181, in __iter__
    for obj in iterable:
  File "F:\software\Anaconda\envs\gigapose\lib\concurrent\futures\_base.py", line 609, in result_iterator
    yield fs.pop().result()
  File "F:\software\Anaconda\envs\gigapose\lib\concurrent\futures\_base.py", line 446, in result
    return self.__get_result()
  File "F:\software\Anaconda\envs\gigapose\lib\concurrent\futures\_base.py", line 391, in __get_result
    raise self._exception
  File "F:\software\Anaconda\envs\gigapose\lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "F:\software\Anaconda\envs\gigapose\lib\site-packages\huggingface_hub\_snapshot_download.py", line 270, in _inner_hf_hub_download
    return hf_hub_download(
  File "F:\software\Anaconda\envs\gigapose\lib\site-packages\huggingface_hub\utils\_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "F:\software\Anaconda\envs\gigapose\lib\site-packages\huggingface_hub\file_download.py", line 840, in hf_hub_download
    return _hf_hub_download_to_local_dir(
  File "F:\software\Anaconda\envs\gigapose\lib\site-packages\huggingface_hub\file_download.py", line 1136, in _hf_hub_download_to_local_dir
    _download_to_tmp_and_move(
  File "F:\software\Anaconda\envs\gigapose\lib\site-packages\huggingface_hub\file_download.py", line 1531, in _download_to_tmp_and_move
    with incomplete_path.open("ab") as f:
  File "F:\software\Anaconda\envs\gigapose\lib\pathlib.py", line 1252, in open
    return io.open(self, mode, buffering, encoding, errors, newline,
  File "F:\software\Anaconda\envs\gigapose\lib\pathlib.py", line 1120, in _opener
    return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '.cache\\huggingface\\download\\default_detections\\core19_model_based_seen\\gdrnppdet-pbr\\gdrnppdet-pbr_icbin-test_80434807-4692-4227-90bb-70212f3e8e66.json.f3bd7ce45287d93c0f1ef807ef3f4e7a9ab41db0.incomplete'
  • 写回答

3条回答 默认 最新

  • 道友老李 JWE233286一种基于机器视觉的水表指针读数识别及修正的方法 专利发明者 2025-01-10 16:30
    关注
    让【道友老李】来帮你解答,本回答参考gpt编写,并整理提供,如果还有疑问可以点击头像关注私信或评论。
    如果答案让您满意,请采纳、关注,非常感谢!
    根据您提供的信息,报错信息表明在下载文件时出现了问题,可能是网络连接或其他问题导致的。以下是一些可能的解决方法:
    1. 检查网络连接:首先确保您的网络连接正常,尝试重启网络设备或者切换至其他网络环境再次尝试运行命令。
    2. 检查mirror设置:确认您的镜像网站设置正确,可以尝试更换其他镜像源或取消镜像设置,以消除可能的问题。
    3. 检查环境变量:检查您的环境变量设置是否正确,确保所有路径和配置都指向正确的位置。
    4. 更新相关库:尝试更新相关的库到最新版本,有时候更新可以修复一些bug或者不兼容的问题。
    5. 查找类似问题的解决方案:在相关社区或者开源项目的issue页面搜索类似的报错信息,可能有其他用户遇到过相同的问题并给出了解决方案。 以下是一些命令行的示例代码:
    huggingface-cli download bop-benchmark/datasets --include default_detections/* --cache-dir ./dataset --local-dir ./ --local-dir-use-symlinks False --repo-type=dataset
    

    希望以上内容可以帮助您解决问题。如果仍有疑问,请提供更多详细信息以便更好地帮助您解决问题。

    评论

报告相同问题?

问题事件

  • 创建了问题 1月10日