Problem with kernel/connecting with server

Hi everyone,

Cognitive neuroscientist first time seriously trying to learn how to use Jupyter Notebook and Python. I first used Anaconda and Jupyter Notebook about half a year ago and I didn’t have any issues. Today, I decided to try and learn it more seriously. However, when I opened the Notebook from the Anaconda Prompt, I get this message:

“Error starting kernel: Network error when attempting to fetch resource”

I also get another message:

"Server Connection Error
A connection to the Jupyter server could not be established. JupyterLab will continue trying to reconnect. Check your network connection or Jupyter server configuration. "

I’ve tried reinstalling Anaconda and upgrading Jupyter Notebook but it doesn’t seem to work. The only thing I can think of that’s causing this is the VPN I’m using since I’m in China. However, when I distable the VPN, it doesn’t work either. This is the message I’m getting from the Anaconda Prompt:

(base) PS C:\Users\natha> conda activate mne
(mne) PS C:\Users\natha> jupyter lab
[I 2022-09-22 19:59:08.569 ServerApp] jupyterlab | extension was successfully linked.
[I 2022-09-22 19:59:09.640 ServerApp] nbclassic | extension was successfully linked.
[I 2022-09-22 19:59:09.743 ServerApp] nbclassic | extension was successfully loaded.
[I 2022-09-22 19:59:09.745 LabApp] JupyterLab extension loaded from C:\Users\natha\anaconda3\envs\mne\lib\site-packages\jupyterlab
[I 2022-09-22 19:59:09.745 LabApp] JupyterLab application directory is C:\Users\natha\anaconda3\envs\mne\share\jupyter\lab
[I 2022-09-22 19:59:09.753 ServerApp] jupyterlab | extension was successfully loaded.
[I 2022-09-22 19:59:09.755 ServerApp] Serving notebooks from local directory: C:\Users\natha
[I 2022-09-22 19:59:09.756 ServerApp] Jupyter Server 1.18.1 is running at:
[I 2022-09-22 19:59:09.756 ServerApp] http://localhost:8888/lab?token=3d6732a7494da80c052d381a30c90b4581b98cee8f9d2016
[I 2022-09-22 19:59:09.756 ServerApp]  or http://127.0.0.1:8888/lab?token=3d6732a7494da80c052d381a30c90b4581b98cee8f9d2016
[I 2022-09-22 19:59:09.756 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2022-09-22 19:59:09.848 ServerApp]

    To access the server, open this file in a browser:
        file:///C:/Users/natha/AppData/Roaming/jupyter/runtime/jpserver-27024-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/lab?token=3d6732a7494da80c052d381a30c90b4581b98cee8f9d2016
     or http://127.0.0.1:8888/lab?token=3d6732a7494da80c052d381a30c90b4581b98cee8f9d2016
[W 2022-09-22 19:59:20.137 LabApp] Could not determine jupyterlab build status without nodejs
[W 2022-09-22 19:59:23.587 ServerApp] Notebook My MNE Projects/pybrain_mne-main/02-working_with_BIDS_data.ipynb is not trusted
[W 2022-09-22 19:59:23.608 ServerApp] Notebook My MNE Projects/pybrain_mne-main/01-read_raw_crop_filter.ipynb is not trusted
[W 2022-09-22 19:59:23.620 ServerApp] Notebook My MNE Projects/pybrain_mne-main/04-cleaning_data.ipynb is not trusted
[W 2022-09-22 19:59:23.631 ServerApp] Notebook My MNE Projects/pybrain_mne-main/03-epoching_and_evoked_responses.ipynb is not trusted
Bad address (D:\bld\zeromq_1629967000004\work\src\epoll.cpp:100)
[I 2022-09-22 19:59:26.896 ServerApp] Kernel started: 06802a7e-4ae4-4064-b4a5-33411e6c2998
Bad address (C:\projects\libzmq\src\epoll.cpp:100)
[I 2022-09-22 19:59:30.827 ServerApp] Kernel started: f3ac4af9-2651-4bf2-a7d9-63959d419eef
[I 2022-09-22 19:59:30.834 ServerApp] Kernel started: 5f0a8d40-4613-4240-b9d1-df9a14e5bcf7
[I 2022-09-22 19:59:30.866 ServerApp] Kernel started: 2dbf20a0-dba7-43cd-9521-59a9a6cc025f
(mne) PS C:\Users\natha> Bad address (C:\projects\libzmq\src\epoll.cpp:100)
Bad address (C:\projects\libzmq\src\epoll.cpp:100)
Bad address (C:\projects\libzmq\src\epoll.cpp:100)

Thanks,
Nathan

Hi @Nathan5653 - It sounds like you have encountered this issue and its probably worth checking your version of pyzmq. If your env matches the problem scenario, it might be worth a downgrade of that package until a resolution can be found (which may be imminent).