Commit e8359fe1 authored by Iliya Manolov's avatar Iliya Manolov Committed by Łukasz Nowak

Fixed Jupyter's Unicode file issues by setting the process' locale

@luke @Tyagov 

When SlapOS launches services they don't have their locale set. This was causing problems with unicode characters in Jupyter notebook names. For example, calling the notebook "Ł" crashes Jupyter's kernel. Hardcoding the UTF-8 locale to the ipython_notebook script fixes that but we should look into making a generic fix for any other services that might have this issue in the future.

/reviewed-on !193
parent 5d166bec
......@@ -74,9 +74,13 @@ command-line =
wrapper-path = ${directory:service}/ipython_notebook
parameters-extra = true
# Explicitly define IPython Directory to be used while starting ipython notebook
# Also explicitly force IPython to use en_US.utf8 encoding
environment =
IPYTHONDIR=${directory:ipython_dir}
JUPYTER_CONFIG_DIR=${directory:ipython_dir}
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
[ipython-notebook-config]
<= dynamic-jinja2-template-base
......
......@@ -64,7 +64,7 @@ recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in
rendered = ${buildout:directory}/template.cfg
mode = 0644
md5sum = 43cfed9b2dde36265ed48211b42a70dd
md5sum = 5b7141a56eff4104e6b2c4585ee9448e
context =
key bin_directory buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment