我正在使用jupyter中的ktrain包和this notebook提供的代码。我在qa = text.SimpleQA(INDEXDIR)行得到一个错误。这个错误很长,但下面是一个简短的版本:
HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /bert-large-uncased-whole-word-masking-finetuned-squad/resolve/main/config.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1125)')))
HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /bert-large-uncased-whole-word-masking-finetuned-squad/resolve/main/config.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1125)')))
OSError: Can't load config for 'bert-large-uncased-whole-word-masking-finetuned-squad'. Make sure that:
- 'bert-large-uncased-whole-word-masking-finetuned-squad' is a correct model identifier listed on 'https://huggingface.co/models'
- or 'bert-large-uncased-whole-word-masking-finetuned-squad' is the correct path to a directory containing a config.json file我可以在我的浏览器上访问https://huggingface.co/bert-large-uncased-whole-word-masking-finetuned-squad/resolve/main/config.json。我完全不知道该做什么--我的编码技能充其量也就是最低限度,所以任何建议都将不胜感激。
发布于 2021-07-14 10:19:46
我的猜测是,你的公司内部网在所有https流量上插入了一个“中间人”。我猜下面的代码现在也会给你同样的错误:
import requests
requests.get('https://www.huggingface.co')如果您从IT部门获得CA证书捆绑包,并且您使用的是Windows,则可以尝试执行以下操作:
import os
os.environ['REQUESTS_CA_BUNDLE'] = 'path/to/certificates_ca_bundle.crt'
qa = text.SimpleQA(INDEXDIR)如果在Linux上,请使用these instructions安装证书。
https://stackoverflow.com/questions/68316635
复制相似问题