Ask Your Question
1

Opening "old" Sage Notebooks in Jupyter: not UTF-8 encoded

asked 5 years ago

thethinker gravatar image

updated 5 years ago

FrédéricC gravatar image

I've decided to pay attention to the "Sage Notebook is Deprecated" message at the top of all of my Notebooks, and convert everything into Jupyter. So it seems that I'm got Jupyter running on my system (through Anaconda), but when I save all my SageMath notebooks (as .sws files, since that seems to happen by default), and open them in Jupyter, (I'm running Jupyter with "sage -n jupyter"), I get the message in the notebook that the file is not UTF-8 encoded, and nothing else (sorry, I can't for the life of me seem to cut and paste this exact message from the Jupyter notebook...).

I did a little searching and at least discovered this:

$ file -bi Embedded\ Torus\ in\ Invariant\ Coordinates\ \(S3\ Scale\ Factor\,\ Bump\).sws 
$ application/x-bzip2; charset=binary

So this file (and all my Sage Notebook Files) have "binary" listed as the character set. That seems bad to me - if it's a character set, shouldn't it be ASCII at least, or something?

Anyone know how I can get these notebooks into Jupyter? I can go back and save them as something different if I knew what I needed to do.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 5 years ago

eric_g gravatar image

updated 5 years ago

You cannot open your sws notebooks directly with Jupyter. Rather, you should first convert them to ipynb format. This is easily done by running the Sage notebook exporter, via

sage -n

Under "Convert old notebooks to Jupyter", you will see the list of your sws notebooks. Click on one of them to convert it to Jupyter format.

Preview: (hide)
link

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: 5 years ago

Seen: 1,920 times

Last updated: Jun 20 '19