Ask Your Question

Error when running a command

asked 2018-08-11 09:48:34 -0500

pizza gravatar image

updated 2018-08-11 13:46:00 -0500

eric_g gravatar image

Why does sage say that there is an error when I type a command and run it? (even I run 1+1, the error appear)

Here is how sage says:

ERROR: 'closed'

Communication with the Sage server is failing.

Here are some actions you could try to resolve this problem: - check your internet connection, - run this cell again, - close and reopen this file, - restart the project (in project settings, wrench icon), - reload the browser tab or even restart your browser, - delete some of the content in the project's ~/.local directory, (locally installed Python libraries might interfere with running this worksheet)

edit retag flag offensive close merge delete


The file is updated and the internet is running smoothly. What can I do?

pizza gravatar imagepizza ( 2018-08-11 09:50:01 -0500 )edit

You should describe carefully your situation. Sage can be used in at least 4 ways. From your description I believe that you use the Jupyter notebook. Secondly, you should be very precise about how you did install Sage and what did you do to launch the notebook. Lastly, when the Jupyter notebook is running, there is a console displaying very useful debugging information. You should copy/paste them.

vdelecroix gravatar imagevdelecroix ( 2018-08-12 11:08:39 -0500 )edit

And note that Sage does not need internet at all.

vdelecroix gravatar imagevdelecroix ( 2018-08-12 11:08:54 -0500 )edit

Sounds like a temporary connection problem with cocalc.

Iguananaut gravatar imageIguananaut ( 2018-08-13 05:09:52 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2018-08-13 04:08:46 -0500

Emmanuel Charpentier gravatar image

The elements you give (Communication with the Sage server is failing., running this worksheet) let us infer that you are running a Jupyter notebook worksheet (or maybe a Sage notebook worksheet).

In this situation, your client (Jupyter or the Sage notebook) establishes a network connection (not necessarily an Internet connection...) with a local server (spawning one if necessary).

Depending on you platform (which you didn't state), there are a few ways this connection can be messed up ; how to fix it depends on the specifics of the trouble, which you gave us no way to diagnose or even divine...

What you can do (at least for a Jupyter notebook, I haven't used the Sage notebook in a long while) is :

  • save your worksheet then close it ;

  • close your client, then kill its server (C-c C-c in its terminal windows)

  • restart your client

  • reopen your worksheet and re-evaluate all cells (it has probably been saved in an inconsistent state...).

Post-scriptum : I see (a bit lately) that you have added the tag cocalc to your question. If this happens in a CoCalc session, the problem is internal to CoCalc : their client, which you access through the Internet, indeed), cant communicate with their server. What you should do in this case is to report the problem to CoCalc's staff : as far as I can tell, there is nothing you can do...

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


Asked: 2018-08-11 09:48:34 -0500

Seen: 152 times

Last updated: Aug 13