linux通过load_dataset报错

3 篇文章 0 订阅
3 篇文章 0 订阅
from datasets import load_dataset
url = "https://github.com/crux82/squad-it/raw/master/"
data_files = {
    "train": url + "SQuAD_it-train.json.gz",
    "test": url + "SQuAD_it-test.json.gz",
}
squad_it_dataset = load_dataset("json", data_files=data_files, field="data")
Traceback (most recent call last)
File ~/userfolder/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py:445, in HTTPConnectionPool._make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
    441         except BaseException as e:
    442             # Remove the TypeError from the exception chain in
    443             # Python 3 (including for exceptions like SystemExit).
    444             # Otherwise it looks like a bug in the code.
--> 445             six.raise_from(e, None)
    446 except (SocketTimeout, BaseSSLError, SocketError) as e:

File <string>:3, in raise_from(value, from_value)

File ~/userfolder/anaconda3/lib/python3.9/site-packages/urllib3/connectionpool.py:440, in HTTPConnectionPool._make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
    439 try:
--> 440     httplib_response = conn.getresponse()
    441 except BaseException as e:
    442     # Remove the TypeError from the exception chain in
    443     # Python 3 (including for exceptions like SystemExit).
    444     # Otherwise it looks like a bug in the code.

File ~/userfolder/anaconda3/lib/python3.9/http/client.py:1371, in HTTPConnection.getresponse(self)
   1370 try:
-> 1371     response.begin()
   1372 except ConnectionError:
...
--> 529     raise ReadTimeout(e, request=request)
    530 else:
    531     raise

ReadTimeout: HTTPSConnectionPool(host='github.com', port=443): Read timed out. (read timeout=10.0)

应该是校园网和内部网不能很好连接github的问题,换成私人网络或者流量应该就可以了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值