OpenAttack
OpenAttack copied to clipboard
Running the NLI example
Hi OpenAttack Team,
I am running the NLI example code in colab but get a URL error: The example code is in https://github.com/thunlp/OpenAttack/blob/master/examples/nli_attack.py
To be specific, it is this line that causes the problem:
attacker = OpenAttack.attackers.PWWSAttacker()
---------------------------------------------------------------------------
SSLCertVerificationError Traceback (most recent call last)
/usr/lib/python3.7/urllib/request.py in do_open(self, http_class, req, **http_conn_args)
1349 h.request(req.get_method(), req.selector, req.data, headers,
-> 1350 encode_chunked=req.has_header('Transfer-encoding'))
1351 except OSError as err: # timeout error
22 frames
SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1091)
During handling of the above exception, another exception occurred:
URLError Traceback (most recent call last)
/usr/lib/python3.7/urllib/request.py in do_open(self, http_class, req, **http_conn_args)
1350 encode_chunked=req.has_header('Transfer-encoding'))
1351 except OSError as err: # timeout error
-> 1352 raise URLError(err)
1353 r = h.getresponse()
1354 except:
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1091)>
Could you help me with it?