pywintypes.error: (50, 'GetFileSecurity', 'The request is not supported.') while using Jupyter Notebook on network drive

前端 未结 2 616
死守一世寂寞
死守一世寂寞 2021-01-14 11:33

I am currently trying to use a combination of miniconda + jupyter (installed with pip) on a network drive and I get the following error:

pywintypes.er

相关标签:
2条回答
  • 2021-01-14 11:53

    For anybody having this issue, it seems to be due to updating jupyter notebook, or any other package that can update it.

    The steps to fix the issue are the following,

    pip install jupyter pip install jupyter-client==5.3.1 python -m ipykernel install --user

    0 讨论(0)
  • 2021-01-14 12:15

    The problem you have may be due to access rights for the browser as well as for jupyter lab to run as I have painfully just found.

    My original answer can be found here: https://github.com/jupyter/jupyter_client/issues/481

    But here is my story for others who want to continue to use the latest Jupyter lab/Notebook version:

    (I run Anconda which comes pre installed with Jupyter):

    1- When checking the environment paths by using this command: jupyter --paths I get two roaming locations one for runtime and one for data! This is because I use a corporate laptop and Windows is setup to store user data files in a roaming location on the network!

    (base) C:\>jupyter --paths
    config:
        C:\Users\user_x\.jupyter
        C:\ProgramData\Anaconda3\etc\jupyter
        C:\ProgramData\jupyter
    data:
        \\A-FILEDATA-P\Profile\use_x\AppData\Roaming\jupyter
        C:\ProgramData\Anaconda3\share\jupyter
        C:\ProgramData\jupyter
    runtime:
        \\A-FILEDATA-P\Profile\use_x\AppData\Roaming\jupyter\runtime
    
    (base) C:\>
    

    2- So, I tried modifying C:\Users\user_xxx.jupyter\jupyter_notebook_config.py by adding JUPYTER_RUNTIME_DIR = 'C:\Users\user_x\AppData\Roaming\jupyter\runtime' but it did not work!

    2- However, Big note here: I noticed that jupyter lab command fire a "stand alone" Chrome I have on a removable usb harddisk! which under the corporate Windows setup does not have any rights to write to other folder location on the laptop, thus the security error!

    3- The solution was to setup two folders on my usb disk, where stand alone Chrome is found and set the environment variables to point to those locations like this:

    set JUPYTER_RUNTIME_DIR=D:\jupyter\runtime
    set JUPYTER_DATA_DIR=D:\jupyter
    

    4- The only catch is that you have to do these two commands at the start of every new session as they don't persist say when you restart Jupyter lab! and as @Shongololo pointed out you can only run other programs like Spyder from the command line only for it to read the correct settings!

    It remains to be found out how this could be resolved permanently.

    0 讨论(0)
提交回复
热议问题