I am getting an ssl error when using my fresh sage build.

I admit that I first build sage without thinking about ssl, and then did 
sage -i openssl and sage -f python3.

Should I rebuild from scratch?  If so, what should I do exactly?

Martin

sage: oeis([sum(1 for la in Partitions(n)) for n in range(1,10)])
---------------------------------------------------------------------------
SSLCertVerificationError                  Traceback (most recent call last)
~/sage-develop/local/lib/python3.7/urllib/request.py in do_open(self, 
http_class, req, **http_conn_args)
   1316                 h.request(req.get_method(), req.selector, req.data, 
headers,
-> 1317                           
encode_chunked=req.has_header('Transfer-encoding'))
   1318             except OSError as err: # timeout error

~/sage-develop/local/lib/python3.7/http/client.py in request(self, method, 
url, body, headers, encode_chunked)
   1228         """Send a complete request to the server."""
-> 1229         self._send_request(method, url, body, headers, 
encode_chunked)
   1230 

~/sage-develop/local/lib/python3.7/http/client.py in _send_request(self, 
method, url, body, headers, encode_chunked)
   1274             body = _encode(body, 'body')
-> 1275         self.endheaders(body, encode_chunked=encode_chunked)
   1276 

~/sage-develop/local/lib/python3.7/http/client.py in endheaders(self, 
message_body, encode_chunked)
   1223             raise CannotSendHeader()
-> 1224         self._send_output(message_body, 
encode_chunked=encode_chunked)
   1225 

~/sage-develop/local/lib/python3.7/http/client.py in _send_output(self, 
message_body, encode_chunked)
   1015         del self._buffer[:]
-> 1016         self.send(msg)
   1017 

~/sage-develop/local/lib/python3.7/http/client.py in send(self, data)
    955             if self.auto_open:
--> 956                 self.connect()
    957             else:

~/sage-develop/local/lib/python3.7/http/client.py in connect(self)
   1391             self.sock = self._context.wrap_socket(self.sock,
-> 1392                                                   
server_hostname=server_hostname)
   1393 

~/sage-develop/local/lib/python3.7/ssl.py in wrap_socket(self, sock, 
server_side, do_handshake_on_connect, suppress_ragged_eofs, 
server_hostname, session)
    411             context=self,
--> 412             session=session
    413         )

~/sage-develop/local/lib/python3.7/ssl.py in _create(cls, sock, 
server_side, do_handshake_on_connect, suppress_ragged_eofs, 
server_hostname, context, session)
    852                         raise ValueError("do_handshake_on_connect 
should not be specified for non-blocking sockets")
--> 853                     self.do_handshake()
    854             except (OSError, ValueError):

~/sage-develop/local/lib/python3.7/ssl.py in do_handshake(self, block)
   1116                 self.settimeout(None)
-> 1117             self._sslobj.do_handshake()
   1118         finally:

SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate 
verify failed: unable to get local issuer certificate (_ssl.c:1056)

During handling of the above exception, another exception occurred:

URLError                                  Traceback (most recent call last)
~/sage-develop/local/lib/python3.7/site-packages/sage/databases/oeis.py in 
_fetch(url)
    202         verbose("Fetching URL %s ..." % url, caller_name='OEIS')
--> 203         f = urlopen(url)
    204         result = f.read()

~/sage-develop/local/lib/python3.7/urllib/request.py in urlopen(url, data, 
timeout, cafile, capath, cadefault, context)
    221         opener = _opener
--> 222     return opener.open(url, data, timeout)
    223 

~/sage-develop/local/lib/python3.7/urllib/request.py in open(self, fullurl, 
data, timeout)
    524 
--> 525         response = self._open(req, data)
    526 

~/sage-develop/local/lib/python3.7/urllib/request.py in _open(self, req, 
data)
    542         result = self._call_chain(self.handle_open, protocol, 
protocol +
--> 543                                   '_open', req)
    544         if result:

~/sage-develop/local/lib/python3.7/urllib/request.py in _call_chain(self, 
chain, kind, meth_name, *args)
    502             func = getattr(handler, meth_name)
--> 503             result = func(*args)
    504             if result is not None:

~/sage-develop/local/lib/python3.7/urllib/request.py in https_open(self, 
req)
   1359             return self.do_open(http.client.HTTPSConnection, req,
-> 1360                 context=self._context, 
check_hostname=self._check_hostname)
   1361 

~/sage-develop/local/lib/python3.7/urllib/request.py in do_open(self, 
http_class, req, **http_conn_args)
   1318             except OSError as err: # timeout error
-> 1319                 raise URLError(err)
   1320             r = h.getresponse()

URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate 
verify failed: unable to get local issuer certificate (_ssl.c:1056)>

During handling of the above exception, another exception occurred:

OSError                                   Traceback (most recent call last)
<ipython-input-55-630fae82349f> in <module>
----> 1 oeis([sum(Integer(1) for la in Partitions(n)) for n in 
range(Integer(1),Integer(10))])

~/sage-develop/local/lib/python3.7/site-packages/sage/misc/lazy_import.pyx 
in sage.misc.lazy_import.LazyImport.__call__ 
(build/cythonized/sage/misc/lazy_import.c:3736)()
    351             True
    352         """
--> 353         return self.get_object()(*args, **kwds)
    354 
    355     def __repr__(self):

~/sage-develop/local/lib/python3.7/site-packages/sage/databases/oeis.py in 
__call__(self, query, max_results, first_result)
    385             return self.find_by_id(query)
    386         elif isinstance(query, (list, tuple)):
--> 387             return self.find_by_subsequence(query, max_results, 
first_result)
    388 
    389     def __repr__(self):

~/sage-develop/local/lib/python3.7/site-packages/sage/databases/oeis.py in 
find_by_subsequence(self, subsequence, max_results, first_result)
    534         """
    535         subsequence = str(subsequence)[1:-1]
--> 536         return self.find_by_description(subsequence, max_results, 
first_result)
    537 
    538     def browse(self):

~/sage-develop/local/lib/python3.7/site-packages/sage/databases/oeis.py in 
find_by_description(self, description, max_results, first_result)
    499                    'start': str(first_result)}
    500         url = oeis_url + "search?" + urlencode(options)
--> 501         sequence_list = _fetch(url).split('\n\n')[2:-1]
    502         return FancyTuple([self.find_by_entry(entry=_) for _ in 
sequence_list])
    503 

~/sage-develop/local/lib/python3.7/site-packages/sage/databases/oeis.py in 
_fetch(url)
    206         return bytes_to_str(result)
    207     except IOError as msg:
--> 208         raise IOError("%s\nError fetching %s." % (msg, url))
    209 
    210 

OSError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify 
failed: unable to get local issuer certificate (_ssl.c:1056)>
Error fetching 
https://oeis.org/search?q=1%2C+2%2C+3%2C+5%2C+7%2C+11%2C+15%2C+22%2C+30&n=3&fmt=text&start=0.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/f8f79c23-6572-4030-a9ab-bcbc9e024547n%40googlegroups.com.

Reply via email to