Ask Your Question
0

[CoCalc][SageManifolds] Error : Black hole rendering with SageMath 3

asked 2023-11-21 07:10:10 +0100

wookhwi gravatar image

updated 2023-11-21 09:36:23 +0100

FrédéricC gravatar image

I tried my CoCalc project with the Internet connected. However, errors continued in the same part.

The error source is Black hole rendering with SageMath in Image of an accretion disk around a Schwarzschild black hole

The error occur in Cell Number [61] and [62] as below


TimeoutError Traceback (most recent call last) File /ext/sage/10.0/local/var/lib/sage/venv-python3.11.1/lib/python3.11/urllib/request.py:1348, in AbstractHTTPHandler.do_open(self, http_class, req, **http_conn_args) 1347 try: -> 1348 h.request(req.get_method(), req.selector, req.data, headers, 1349 encode_chunked=req.has_header('Transfer-encoding')) 1350 except OSError as err: # timeout error File /ext/sage/10.0/local/var/lib/sage/venv-python3.11.1/lib/python3.11/http/client.py:1282, in HTTPConnection.request(self, method, url, body, headers, encode_chunked) 1281 """Send a complete request to the server.""" -> 1282 self._send_request(method, url, body, headers, encode_chunked) File /ext/sage/10.0/local/var/lib/sage/venv-python3.11.1/lib/python3.11/http/client.py:1328, in HTTPConnection._send_request(self, method, url, body, headers, encode_chunked) 1327 body = _encode(body, 'body') -> 1328 self.endheaders(body, encode_chunked=encode_chunked) File /ext/sage/10.0/local/var/lib/sage/venv-python3.11.1/lib/python3.11/http/client.py:1277, in HTTPConnection.endheaders(self, message_body, encode_chunked) 1276 raise CannotSendHeader() -> 1277 self._send_output(message_body, encode_chunked=encode_chunked) File /ext/sage/10.0/local/var/lib/sage/venv-python3.11.1/lib/python3.11/http/client.py:1037, in HTTPConnection._send_output(self, message_body, encode_chunked) 1036 del self._buffer[:] -> 1037 self.send(msg) 1039 if message_body is not None: 1040 1041 # create a consistent interface to message_body File /ext/sage/10.0/local/var/lib/sage/venv-python3.11.1/lib/python3.11/http/client.py:975, in HTTPConnection.send(self, data) 974 if self.auto_open: --> 975 self.connect() 976 else: File /ext/sage/10.0/local/var/lib/sage/venv-python3.11.1/lib/python3.11/http/client.py:941, in HTTPConnection.connect(self) 940 sys.audit("http.client.connect", self, self.host, self.port) --> 941 self.sock = self._create_connection( 942 (self.host,self.port), self.timeout, self.source_address) 943 # Might fail in OSs that don't implement TCP_NODELAY File /ext/sage/10.0/local/var/lib/sage/venv-python3.11.1/lib/python3.11/socket.py:851, in create_connection(address, timeout, source_address, all_errors) 850 if not all_errors: --> 851 raise exceptions[0] 852 raise ExceptionGroup("create_connection failed", exceptions) File /ext/sage/10.0/local/var/lib/sage/venv-python3.11.1/lib/python3.11/socket.py:836, in create_connection(address, timeout, source_address, all_errors) 835 sock.bind(source_address) --> 836 sock.connect(sa) 837 # Break explicitly a reference cycle TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred: URLError Traceback (most recent call last) Cell In [61], line 2 1 from six.moves.urllib.request import urlretrieve # valid for both Python 2 and Python 3 ----> 2 urlretrieve("www.cvrl.org/database/data/cmfs/ciexyzjv.csv", 3 "ciexyzjv.csv") 4 ciexyz = np.genfromtxt("ciexyzjv.csv", delimiter=",") File /ext/sage/10.0/local/var/lib/sage/venv-python3.11.1/lib/python3.11/urllib/request.py:241, in urlretrieve(url, filename, reporthook, data) 224 """ 225 Retrieve a URL into a temporary location on disk. 226 (...) 237 data file as well as the resulting HTTPMessage object. 238 """ 239 url_type, path = _splittype(url) --> 241 with contextlib.closing(urlopen(url, data)) as fp: 242 headers = fp.info() 244 # Just return the local path and the "headers" for file:// 245 # URLs. No sense in performing a copy unless requested. File /ext/sage/10.0/local/var/lib/sage/venv-python3.11.1/lib/python3.11/urllib/request.py:216, in urlopen(url, data, timeout, cafile, capath, cadefault, context) 214 else: 215 opener = _opener --> 216 return opener.open(url, data, timeout) File /ext/sage/10.0/local/var/lib/sage/venv-python3.11.1/lib/python3.11/urllib/request.py:519, in OpenerDirector.open(self, fullurl, data, timeout) 516 req = meth(req) 518 sys.audit('urllib.Request', req.full_url, req.data, req.headers, req.get_method()) --> 519 response = self._open(req, data) 521 # post-process response 522 meth_name = protocol+"_response" File /ext/sage/10.0/local/var/lib/sage/venv-python3.11.1/lib/python3.11/urllib/request.py:536, in OpenerDirector._open(self, req, data) 533 return result 535 protocol = req.type --> 536 result = self._call_chain(self.handle_open, protocol, protocol + 537 '_open', req) 538 if result: 539 return result File /ext/sage/10.0/local/var/lib/sage/venv-python3.11.1/lib/python3.11/urllib/request.py:496, in OpenerDirector._call_chain(self, chain, kind, meth_name, args) 494 for handler in handlers: 495 func = getattr(handler, meth_name) --> 496 result = func(args) 497 if result is not None: 498 return result File /ext/sage/10.0/local/var/lib/sage/venv-python3.11.1/lib/python3.11/urllib/request.py:1377, in HTTPHandler.http_open(self, req) 1376 def http_open(self, req): -> 1377 return self.do_open(http.client.HTTPConnection, req) File /ext/sage/10.0/local/var/lib/sage/venv-python3.11.1/lib/python3.11/urllib/request.py:1351, in AbstractHTTPHandler.do_open(self, http_class, req, **http_conn_args) 1348 h.request(req.get_method(), req.selector, req.data, headers, 1349 encode_chunked=req.has_header('Transfer-encoding')) 1350 except OSError as err: # timeout error -> 1351 raise URLError(err) 1352 r = h.getresponse() 1353 except: URLError: <urlopen error="" [errno="" 110]="" connection="" timed="" out="">

edit retag flag offensive close merge delete

Comments

[62] error


NameError Traceback (most recent call last) Cell In [64], line 2 1 import matplotlib.pyplot as plt ----> 2 plt.plot(ciexyz[:,Integer(0)],ciexyz[:,Integer(3)], label='Z') 3 plt.plot(ciexyz[:,Integer(0)],ciexyz[:,Integer(2)], label='Y') 4 plt.plot(ciexyz[:,Integer(0)],ciexyz[:,Integer(1)], label='X') NameError: name 'ciexyz' is not defined

wookhwi gravatar imagewookhwi ( 2023-11-21 07:14:02 +0100 )edit

[65] error


FileNotFoundError Traceback (most recent call last) Cell In [67], line 1 ----> 1 get_ipython().run_cell_magic('cython', '', 'from __main__ import blackbody\nfrom libc.math cimport exp\nimport numpy as np\ncimport numpy as np\ncimport cython\n\nDTYPE = float\nctypedef np.float_t DTYPE_t\n\ncdef np.float_t[:] cielamb\ncdef np.float_t[:] ciex\ncdef np.float_t[:] ciey\ncdef np.float_t[:] ciez\n\ndef init_arrays():\n global cielamb, ciex, ciey, ciez\n cdef np.ndarray[np.float_t, ndim=2] ciexyz = np.genfromtxt(\'ciexyzjv.csv\', delimiter=",") \n cielamb = ciexyz[:, 0]\n ciex = ciexyz[:, 1]\n ciey = ciexyz[:, 2]\n ciez = ciexyz[:, 3]\n \ninit_arrays()\n\ncpdef tup

wookhwi gravatar imagewookhwi ( 2023-11-21 07:16:56 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2023-11-21 11:22:35 +0100

eric_g gravatar image

The notebook Black hole rendering with SageMath works well on my CoCalc account with the SageMath 10.0 kernel (not the 10.1 kernel for the CoCalc issue with Pythran discussed here). Since cell [61] is trying to download a public data file from http://www.cvrl.org/, you are clearly facing an internet access issue from your account. You should contact the CoCalc help desk by clicking on the buttom "Help" in the top right menu of the CoCalc window.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-11-21 07:10:10 +0100

Seen: 281 times

Last updated: Nov 21 '23