So i was following a youtube tutorial and needed to set my virtual environment for jupyter in my command prompt and when i write jupyter lab my command prompt stops responding and doesn’t allow me to write anything because the next line doesn’t work.
Even without setting the environment it does the same thing.
I installed the latest version of anaconda today after witnessing the same issue prior.
so when i type jupyter lab i get the following :-
jupyter lab
……
To access the server, open this file in a browser:
file:///C:/Users/ACER/AppData/Roaming/jupyter/runtime/jpserver-13908-open.html
Or copy and paste one of these URLs:
http://localhost:8888/lab?token=1a303eff345dbbeff2f77d03baa6184ba1fd8e066123d66f
http://127.0.0.1:8888/lab?token=1a303eff345dbbeff2f77d03baa6184ba1fd8e066123d66f
[I 2024-08-04 16:17:24.382 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
0.01s – Debugger warning: It seems that frozen modules are being used, which may
0.00s – make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s – to python to disable frozen modules.
0.00s – Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[W 2024-08-04 16:17:31.348 LabApp] Could not determine jupyterlab build status without nodejs
[W 2024-08-04 16:17:32.163 ServerApp] wrote error: ‘Forbidden’
Traceback (most recent call last):
File “C:UsersACERanaconda3Libsite-packagestornadoweb.py”, line 1790, in _execute
result = await result
^^^^^^^^^^^^
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:UsersACERanaconda3Libsite-packagestornadoweb.py", line 1790, in _execute
result = await result
^^^^^^^^^^^^
File "C:UsersACERanaconda3Libsite-packagesjupyter_serverauthdecorator.py", line 73, in inner
return await out
KeyError: 'last_activity'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:UsersACERanaconda3Libsite-packagestornadoweb.py", line 1790, in _execute
result = await result
^^^^^^^^^^^^
File "C:UsersACERanaconda3Libsite-packagesjupyter_serverauthdecorator.py", line 73, in inner
return await out
^^^^^^^^^
File "C:UsersACERanaconda3Libsite-packagesjupyter_serverserviceskernelshandlers.py", line 41, in get
kernels = await ensure_async(km.list_kernels())
^^^^^^^^^^^^^^^^^
File "C:UsersACERanaconda3Libsite-packagesjupyter_serverserviceskernelskernelmanager.py", line 521, in list_kernels
model = self.kernel_model(kernel_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:UsersACERanaconda3Libsite-packagesjupyter_serverserviceskernelskernelmanager.py", line 507, in kernel_model
"last_activity": isoformat(kernel.last_activity),
^^^^^^^^^^^^^^^^^^^^
File "C:UsersACERanaconda3Libsite-packagestraitletstraitlets.py", line 687, in __get__
return t.cast(G, self.get(obj, cls)) # the G should encode the Optional
^^^^^^^^^^^^^^^^^^
File "C:UsersACERanaconda3Libsite-packagestraitletstraitlets.py", line 649, in get
value = self._validate(obj, default)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:UsersACERanaconda3Libsite-packagestraitletstraitlets.py", line 722, in _validate
value = self.validate(obj, value)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:UsersACERanaconda3Libsite-packagestraitletstraitlets.py", line 2311, in validate
self.error(obj, value)
File "C:UsersACERanaconda3Libsite-packagestraitletstraitlets.py", line 831, in error
raise TraitError(e)
traitlets.traitlets.TraitError: The 'last_activity' trait of a ServerKernelManager instance expected a datetime, not the NoneType None.
[E 2024-08-04 16:17:40.077 ServerApp] {
“Host”: “localhost:8888”,
“Accept”: “/“,
“Referer”: “http://localhost:8888/lab/tree/Getting%20Started.ipynb?”,
“User-Agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36 Edg/127.0.0.0”
}
[E 2024-08-04 16:17:40.079 ServerApp] 500 GET /api/kernels?1722777459980 (b55017e6aace4da0b117d7d7d9fbc16e@::1) 34.91ms referer=http://localhost:8888/lab/tree/Getting%20Started.ipynb?
[I 2024-08-04 16:17:40.090 ServerApp] Kernel started: cd98396c-a478-4f2d-8930-49b1518cabf0
0.01s – Debugger warning: It seems that frozen modules are being used, which may
0.00s – make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s – to python to disable frozen modules.
0.00s – Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[I 2024-08-04 16:17:43.919 ServerApp] Connecting to kernel cd98396c-a478-4f2d-8930-49b1518cabf0.
[I 2024-08-04 16:17:43.940 ServerApp] Connecting to kernel cd98396c-a478-4f2d-8930-49b1518cabf0.
[I 2024-08-04 16:17:43.982 ServerApp] Connecting to kernel cd98396c-a478-4f2d-8930-49b1518cabf0.
[I 2024-08-04 16:19:40.125 ServerApp] Saving file at /Getting Started.ipynb
[W 2024-08-04 16:19:40.128 ServerApp] Notebook Getting Started.ipynb is not trusted
and my command prompt stops even though jupyter opened but this makes it harder to set a venv.
I have uninstalled and installed anaconda , i have removed parts of this error because stackoverflow wont let me ask my first ever question on this platform and instead says it ‘appears’ spam. Well looks like someone just had a Type 1 error.
GoogleMeet is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.