PyCharm JupyterLab Notebook errors - launches an external terminal and then just keeps throwing 403 GET and 401 POST errors

PyCharm configuration is messed up.  It does not correctly launch an in-line kernel for JupyterLab or Jupyter Classic Notebook. 

It launches an external terminal and then just keeps throwing 403 GET and 401 POST errors.  

I do not want to use Jupyter Classic Notebook because I have widgets in the Notebook that depend on JupyterLab.   

The terminal window should be hidden anyway.  

Pycharm is not grabbing and using the token for the Jupyter Server session.  This should be done automatically, not manually.

Also, I use conda for the environment manager, NOT pip.  PyCharm keeps installing packages using pip, even though there are the latest conda packages.  How do I set conda as the default environment and Python package manager within Pycharm?

[W 17:59:58.786 NotebookApp] Loading JupyterLab as a classic notebook (v6) extension.
[C 17:59:58.786 NotebookApp] You must use Jupyter Server v1 to load JupyterLab as notebook extension. You have v2.5.0 installed.
    You can fix this by executing:
        pip install -U "jupyter-server<2.0.0"
[I 17:59:58.791 NotebookApp] Serving notebooks from local directory: C:/Users/PowerUser/Desktop/00_PythonWIP_2022/DTale
[I 17:59:58.791 NotebookApp] Jupyter Notebook 6.5.4 is running at:
[I 17:59:58.791 NotebookApp] http://localhost:8888/?token=7c2994d59a6a745ab8f643e06725906572ab6511492e70b3
[I 17:59:58.791 NotebookApp]  or http://127.0.0.1:8888/?token=7c2994d59a6a745ab8f643e06725906572ab6511492e70b3
[I 17:59:58.792 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 17:59:58.806 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///C:/Users/PowerUser/AppData/Roaming/jupyter/runtime/nbserver-5712-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=7c2994d59a6a745ab8f643e06725906572ab6511492e70b3
     or http://127.0.0.1:8888/?token=7c2994d59a6a745ab8f643e06725906572ab6511492e70b3
[W 18:00:02.662 NotebookApp] Forbidden
[W 18:00:02.664 NotebookApp] 403 GET /api/sessions (127.0.0.1) 5.000000ms referer=None
[W 18:00:02.667 NotebookApp] Forbidden
[W 18:00:02.670 NotebookApp] 403 GET /api/sessions (127.0.0.1) 9.730000ms referer=None
[W 18:00:02.722 NotebookApp] 401 POST /login (127.0.0.1) 1.920000ms referer=None
[W 18:00:32.670 NotebookApp] Forbidden
[W 18:00:32.671 NotebookApp] 403 GET /api/sessions (127.0.0.1) 2.000000ms referer=None
[W 18:00:32.672 NotebookApp] Forbidden
[W 18:00:32.673 NotebookApp] 403 GET /api/sessions (127.0.0.1) 2.090000ms referer=None
[W 18:00:32.680 NotebookApp] 401 POST /login (127.0.0.1) 2.000000ms referer=None
[W 18:01:02.683 NotebookApp] Forbidden
[W 18:01:02.684 NotebookApp] 403 GET /api/sessions (127.0.0.1) 3.050000ms referer=None
[W 18:01:02.686 NotebookApp] Forbidden
[W 18:01:02.687 NotebookApp] 403 GET /api/sessions (127.0.0.1) 2.990000ms referer=None
[W 18:01:02.696 NotebookApp] 401 POST /login (127.0.0.1) 2.990000ms referer=None
[W 18:01:32.697 NotebookApp] Forbidden
[W 18:01:32.699 NotebookApp] 403 GET /api/sessions (127.0.0.1) 4.010000ms referer=None
[W 18:01:32.702 NotebookApp] Forbidden
[W 18:01:32.703 NotebookApp] 403 GET /api/sessions (127.0.0.1) 2.590000ms referer=None
[W 18:01:32.716 NotebookApp] 401 POST /login (127.0.0.1) 3.990000ms referer=None
[W 18:02:02.702 NotebookApp] Forbidden
[W 18:02:02.703 NotebookApp] 403 GET /api/sessions (127.0.0.1) 2.990000ms referer=None
[W 18:02:02.706 NotebookApp] Forbidden
[W 18:02:02.707 NotebookApp] 403 GET /api/sessions (127.0.0.1) 2.580000ms referer=None
[W 18:02:02.719 NotebookApp] 401 POST /login (127.0.0.1) 3.040000ms referer=None
[W 18:02:32.706 NotebookApp] Forbidden
[W 18:02:32.708 NotebookApp] 403 GET /api/sessions (127.0.0.1) 4.060000ms referer=None
[W 18:02:32.712 NotebookApp] Forbidden
[W 18:02:32.714 NotebookApp] 403 GET /api/sessions (127.0.0.1) 2.950000ms referer=None
[W 18:02:32.729 NotebookApp] 401 POST /login (127.0.0.1) 3.020000ms referer=None
[W 18:03:02.717 NotebookApp] Forbidden
[W 18:03:02.718 NotebookApp] 403 GET /api/sessions (127.0.0.1) 1.990000ms referer=None
[W 18:03:02.722 NotebookApp] Forbidden
[W 18:03:02.723 NotebookApp] 403 GET /api/sessions (127.0.0.1) 2.100000ms referer=None
[W 18:03:02.734 NotebookApp] 401 POST /login (127.0.0.1) 4.670000ms referer=None
[W 18:03:32.721 NotebookApp] Forbidden
[W 18:03:32.722 NotebookApp] 403 GET /api/sessions (127.0.0.1) 3.050000ms referer=None
[W 18:03:32.728 NotebookApp] Forbidden
[W 18:03:32.732 NotebookApp] 403 GET /api/sessions (127.0.0.1) 5.990000ms referer=None
[W 18:03:32.748 NotebookApp] 401 POST /login (127.0.0.1) 3.990000ms referer=None
[W 18:04:02.721 NotebookApp] Forbidden
[W 18:04:02.721 NotebookApp] 403 GET /api/sessions (127.0.0.1) 0.000000ms referer=None
[W 18:04:02.724 NotebookApp] Forbidden
[W 18:04:02.725 NotebookApp] 403 GET /api/sessions (127.0.0.1) 2.000000ms referer=None
[W 18:04:02.729 NotebookApp] 401 POST /login (127.0.0.1) 1.030000ms referer=None
[W 18:04:32.734 NotebookApp] Forbidden
[W 18:04:32.734 NotebookApp] 403 GET /api/sessions (127.0.0.1) 1.290000ms referer=None
[W 18:04:32.735 NotebookApp] Forbidden
[W 18:04:32.735 NotebookApp] 403 GET /api/sessions (127.0.0.1) 0.000000ms referer=None
[W 18:04:32.739 NotebookApp] 401 POST /login (127.0.0.1) 1.030000ms referer=None
[W 18:05:02.733 NotebookApp] Forbidden
[W 18:05:02.734 NotebookApp] 403 GET /api/sessions (127.0.0.1) 1.030000ms referer=None
[W 18:05:02.736 NotebookApp] Forbidden
[W 18:05:02.736 NotebookApp] 403 GET /api/sessions (127.0.0.1) 1.000000ms referer=None
[W 18:05:02.741 NotebookApp] 401 POST /login (127.0.0.1) 2.020000ms referer=None
[W 18:05:32.738 NotebookApp] Forbidden
[W 18:05:32.740 NotebookApp] 403 GET /api/sessions (127.0.0.1) 4.050000ms referer=None
[W 18:05:32.744 NotebookApp] Forbidden
[W 18:05:32.745 NotebookApp] 403 GET /api/sessions (127.0.0.1) 2.990000ms referer=None
[W 18:05:32.757 NotebookApp] 401 POST /login (127.0.0.1) 3.040000ms referer=None
[W 18:06:02.743 NotebookApp] Forbidden
[W 18:06:02.744 NotebookApp] 403 GET /api/sessions (127.0.0.1) 2.080000ms referer=None
[W 18:06:02.748 NotebookApp] Forbidden
[W 18:06:02.748 NotebookApp] 403 GET /api/sessions (127.0.0.1) 1.000000ms referer=None
[W 18:06:02.752 NotebookApp] 401 POST /login (127.0.0.1) 1.000000ms referer=None
[W 18:06:32.752 NotebookApp] Forbidden
[W 18:06:32.753 NotebookApp] 403 GET /api/sessions (127.0.0.1) 0.640000ms referer=None
[W 18:06:32.754 NotebookApp] Forbidden
[W 18:06:32.755 NotebookApp] 403 GET /api/sessions (127.0.0.1) 1.010000ms referer=None
[W 18:06:32.758 NotebookApp] 401 POST /login (127.0.0.1) 1.000000ms referer=None

0
1 comment

Hello, 

Please try running the Jupyterlab server from the system terminal, then try running cells from the browser and check if the problem affects Jupyter outside PyCharm.

If Jupyter runs from the terminal as expected, please upload your idea.log here and tell us the upload ID so we can check it.

0

Please sign in to leave a comment.