Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

notebook can't save unicode as script #1345

Closed
jordens opened this Issue Jan 29, 2012 · 5 comments

Comments

Projects
None yet
3 participants

jordens commented Jan 29, 2012

saving notebooks with unicode cells (code or markdown) fails. evaluation and saving as ipynb work fine though.

WARNING:root:400 PUT /notebooks/96cba213-3f07-4191-ad40-39ac181b890a (127.0.0.1): Unexpected error while saving notebook as script: 'ascii' codec can't encode character u'\u03c0' in position 308: ordinal not in range(128)
WARNING:root:400 PUT /notebooks/96cba213-3f07-4191-ad40-39ac181b890a (127.0.0.1) 2.87ms
Owner

takluyver commented Jan 30, 2012

If no-one beats me to it, I'll try to look into this tomorrow.

Owner

minrk commented Jan 30, 2012

What platform are you on, and what exact unicode is failing? I can save/load just fine with unicode input/output and markdown on OSX, and download as .ipynb and .py.

Owner

takluyver commented Jan 30, 2012

Replicated by starting the notebook with ipython notebook --script.

Owner

minrk commented Jan 30, 2012

aha! I forgot about that case. That should be an easy fix.

takluyver added a commit to takluyver/ipython that referenced this issue Jan 30, 2012

Owner

takluyver commented Jan 30, 2012

Indeed it was: PR #1353

@minrk minrk closed this in 8e8b2a9 Feb 8, 2012

yarikoptic pushed a commit to yarikoptic/ipython that referenced this issue May 2, 2014

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

Merge pull request #1353 from takluyver/i1345
Save notebook as script using unicode file handle.

Using io.open(), which is the Python 3 open() in 2.6 and above.

Closes #1345
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment