首页 > 解决方案 > FileNotFoundError:从 Google Colab 上的 GitHub 下载 zip 文件时找不到文件

问题描述

我正在尝试在 上使用数据集Google Colab,但是当我尝试download使用这段代码时:

from google.colab import files
files.download("https://github.com/RomRoc/objdet_fizyr_colab/blob/master/goat_dataset.zip")

我收到这条消息:

FileNotFoundError:找不到文件:https ://github.com/RomRoc/objdet_fizyr_colab/blob/master/goat_dataset.zip

zip手动下载了这个并解压了,一切都很好,但不是在Colab,我试图filewgetand下载的地方urllib.request.urlretrieve,但它只是下载64.29K文件,原来有12.5 MB.

标签: pythongithubdownloadzipgoogle-colaboratory

解决方案


这是WAI。从文档

files.download将调用浏览器将文件下载到本地计算机。


推荐阅读