Ask Your Question
1

sage 8.5 windows jupyter can't work

asked 2019-01-15 11:49:27 +0200

linuxCipher gravatar image

updated 2019-03-02 07:46:23 +0200

FrédéricC gravatar image

i use a windows laptop with Chinese. i download the windows installer, and install the sage 8.5 successfully. it can run sage(shell) correctly, but when i launch the jupyter, something wrong with it.

"sage -n" use the cmd to start a server, i got

File "/opt/sagemath-8.5/src/bin/sage-notebook", line 268, in 
launcher(unknown)
File "/opt/sagemath-8.5/src/bin/sage-notebook", line 142, in init
super(SageNBExport, self).init(argv)
File "/opt/sagemath-8.5/src/bin/sage-notebook", line 100, in init
main(argv)
File "/opt/sagemath-8.5/local/lib/python2.7/site-packages/jupyter_core/application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/opt/sagemath-8.5/local/lib/python2.7/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/opt/sagemath-8.5/local/lib/python2.7/site-packages/traitlets/config/application.py", line 89, in catch_config_error
app.print_help()
File "/opt/sagemath-8.5/local/lib/python2.7/site-packages/traitlets/config/application.py", line 385, in print_help
self.print_subcommands()
File "/opt/sagemath-8.5/local/lib/python2.7/site-packages/traitlets/config/application.py", line 377, in print_subcommands
print(os.linesep.join(lines))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 4: ordinal not in range(128)

so i try some solutions, i can skip this step, but i got stuck in the jupyter launch step:

Could not decode '\xe6\x9c\xaa\xe5\x91\xbd\xe5\x90\x8d' for unicode trait 'untitled_notebook' of a LargeFileManager instance.

i know there is something wrong with the coding in python (and there are many problems when software operate with Chinese), but i can't find the right way to solve it

edit retag flag offensive close merge delete

Comments

2

Does it work when launch the notebook by clicking to the "jupyter noebook" icon, not typing sage -n from the shell ?

tmonteil gravatar imagetmonteil ( 2019-01-15 15:28:25 +0200 )edit

What can not be decoded is 未命名

FrédéricC gravatar imageFrédéricC ( 2019-01-15 16:59:43 +0200 )edit

Nevermind, it seems Juypter's internationalization efforts will just do this automatically

Iguananaut gravatar imageIguananaut ( 2019-01-15 17:48:02 +0200 )edit

This was also reported as https://github.com/jupyter/notebook/i... though the response was less than helpful.

Iguananaut gravatar imageIguananaut ( 2019-01-15 17:53:20 +0200 )edit

no, it doesn't work with the "jupyter noebook" icon, if i click the icon, the shell open and then the shell closes quickly.

linuxCipher gravatar imagelinuxCipher ( 2019-01-16 03:17:37 +0200 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2019-03-02 04:07:29 +0200

linuxCipher gravatar image

use the cmd "LANGUAGE=en_US sage -n" can solve the bug

edit flag offensive delete link more
1

answered 2019-01-15 18:04:04 +0200

Iguananaut gravatar image

I was able to reproduce this simply by running $ LANGUAGE=zn_CN jupyter notebook. Pretty bad. Try running $ LANGUAGE=en_US jupyter notebook or, if LANGUAGE doesn't work you can try one of LC_ALL, LC_MESSAGES, LANG, etc. as described at https://docs.python.org/2/library/get...

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: 2019-01-15 11:49:27 +0200

Seen: 806 times

Last updated: Mar 02 '19