ImportError: cannot import name 'secure_write'


when I run DLS, I get this error in the “log” and the jupiter notebook does not work :

(“ImportError: cannot import name ‘secure_write’
Traceback (most recent call last):
File “c:\users\rocha\appdata\local\programs\deeplearningstudio\conda3\lib\”, line 193, in run_module_as_main
main”, mod_spec)
File “c:\users\rocha\appdata\local\programs\deeplearningstudio\conda3\lib\”, line 85, in run_code
exec(code, run_globals)
File "C:\Users\rocha\AppData\Local\Programs\DeepLearningStudio\conda3\Scripts\jupyter-lab.exe_main
.py", line 5, in
File “c:\users\rocha\appdata\local\programs\deeplearningstudio\conda3\lib\site-packages\jupyterlab\”, line 7, in
from notebook.notebookapp import NotebookApp, aliases, flags
File “c:\users\rocha\appdata\local\programs\deeplearningstudio\conda3\lib\site-packages\notebook\”, line 81, in
from .services.kernels.kernelmanager import MappingKernelManager
File “c:\users\rocha\appdata\local\programs\deeplearningstudio\conda3\lib\site-packages\notebook\services\kernels\”, line 19, in
from jupyter_client.session import Session
File "c:\users\rocha\appdata\local\programs\deeplearningstudio\conda3\lib\site-packages\jupyter_client_init
.py”, line 4, in
from .connect import *
File “c:\users\rocha\appdata\local\programs\deeplearningstudio\conda3\lib\site-packages\jupyter_client\”, line 35, in
from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write
ImportError: cannot import name ‘secure_write’

Thank you

Do you know what to do?

Thank you


me too
don’t know how to solve this
tried re-install once but it didn’t help
please reply. I am really in a hurry.

Hi, this worked for me:

pip install --upgrade jupyter_client


You can try to replace the original “” file here : C:\Users\your_user_name\AppData\Local\Programs\DeepLearningStudio\conda3\Lib\site-packages\jupyter_core
with this file :
Now my notebook works like a charm !

Best regards