Ask Your Question

metallicmural99's profile - activity

2021-05-04 23:36:40 +0200 received badge  Famous Question (source)
2021-05-04 23:36:40 +0200 received badge  Notable Question (source)
2021-05-04 23:36:40 +0200 received badge  Popular Question (source)
2020-12-09 20:14:06 +0200 received badge  Famous Question (source)
2020-12-09 20:14:06 +0200 received badge  Popular Question (source)
2020-12-09 20:14:06 +0200 received badge  Notable Question (source)
2019-12-19 15:08:01 +0200 received badge  Supporter (source)
2019-12-06 19:59:12 +0200 received badge  Editor (source)
2019-12-06 19:55:24 +0200 asked a question Error while running jupyter with sage

I just recently upgraded my sage to sage 8.9

However, opening jupyter notebook from sage has stopped functioning.

Previously I used to be able to do the following:

$ sage -n jupyter

And this would open jupyter notebook for me with the option of using either sage or python kernel.

When I do the same thing, I now get the following error:

Please wait while the Sage Jupyter Notebook server starts...

[I 13:51:32.844 NotebookApp] Using MathJax: nbextensions/mathjax/MathJax.js

[I 13:51:34.199 NotebookApp] Serving notebooks from local directory: /Users/sunroseshrestha

[I 13:51:34.200 NotebookApp] The Jupyter Notebook is running at:

[I 13:51:34.200 NotebookApp] http://localhost:8888/?token=9ab97f6290fb5f9743fc5f08ff0f296bced77cc85c2f2763

[I 13:51:34.200 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip 
confirmation).

Traceback (most recent call last):

  File "/Applications/SageMath/src/bin/sage-notebook", line 267, in <module>
    launcher(unknown)

  File "/Applications/SageMath/src/bin/sage-notebook", line 99, in __init__
    main(argv)

  File "/Applications/SageMath/local/lib/python3.7/site-packages/jupyter_core/application.py", line 266, in launch_instance

return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)

  File "/Applications/SageMath/local/lib/python3.7/site-packages/traitlets/config/application.py", line 658, in launch_instance

app.start()

  File "/Applications/SageMath/local/lib/python3.7/site-packages/notebook/notebookapp.py", line 1791, in start
self.launch_browser()

  File "/Applications/SageMath/local/lib/python3.7/site-packages/notebook/notebookapp.py", line 1731, in launch_browser

browser = webbrowser.get(self.browser or None)

  File "/Applications/SageMath/local/lib/python3.7/webbrowser.py", line 42, in get
    register_standard_browsers()

  File "/Applications/SageMath/local/lib/python3.7/webbrowser.py", line 530, in register_standard_browsers
    raw_result = subprocess.check_output(cmd, stderr=subprocess.DEVNULL)

  File "/Applications/SageMath/local/lib/python3.7/subprocess.py", line 395, in check_output
    **kwargs).stdout

  File "/Applications/SageMath/local/lib/python3.7/subprocess.py", line 472, in run
    with Popen(*popenargs, **kwargs) as process:

  File "/Applications/SageMath/local/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)

  File "/Applications/SageMath/local/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)

NotADirectoryError: [Errno 20] Not a directory: 'xdg-settings'

How would I fix this?

2019-12-05 12:04:58 +0200 received badge  Student (source)
2019-12-03 18:07:18 +0200 asked a question IPython.display.clear_output() functionality for SageMathCell.

I have a loop which outputs a graphic object (a plot) for each step. But I would like to replace the plot with the plot from the next iteration so I can see the progress as the loop runs. When I am using a jupyter notebook I can do this using the clear_output() function from IPython.display.

However, I am trying to use the SageMathCell server to make the program able to run completely in the browser (without having to go through CoCalc). But I am trouble clearing the output in the sage cell after each iterate of a loop..