ImportError: cannot import name 'secure_write'

Hello,

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\runpy.py”, line 193, in run_module_as_main
main”, mod_spec)
File “c:\users\rocha\appdata\local\programs\deeplearningstudio\conda3\lib\runpy.py”, 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\labapp.py”, line 7, in
from notebook.notebookapp import NotebookApp, aliases, flags
File “c:\users\rocha\appdata\local\programs\deeplearningstudio\conda3\lib\site-packages\notebook\notebookapp.py”, line 81, in
from .services.kernels.kernelmanager import MappingKernelManager
File “c:\users\rocha\appdata\local\programs\deeplearningstudio\conda3\lib\site-packages\notebook\services\kernels\kernelmanager.py”, 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\connect.py”, line 35, in
from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write
ImportError: cannot import name ‘secure_write’
")

Thank you

Phil
Do you know what to do?

Thank you

Phil

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

link_issue

Hi,
You can try to replace the original “paths.py” file here : C:\Users\your_user_name\AppData\Local\Programs\DeepLearningStudio\conda3\Lib\site-packages\jupyter_core
with this file :
(https://github.com/jupyter/jupyter_core/blob/master/jupyter_core/paths.py)
Now my notebook works like a charm !

Best regards