# Notebook 500 Internal Server Error

**URL:** <https://discourse.jupyter.org/t/notebook-500-internal-server-error/28294>\
**Category:** Notebook\
**Created:** [September 11, 2024, 7:08pm UTC](https://discourse.jupyter.org/t/notebook-500-internal-server-error/28294 "2024-09-11T19:08:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tankman649](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/tankman649/32/14837_2.png) [@tankman649](https://discourse.jupyter.org/u/tankman649)\
**Post date:** [September 11, 2024, 7:08pm UTC](https://discourse.jupyter.org/t/notebook-500-internal-server-error/28294/1 "2024-09-11T19:08:45Z")

</div>

I was using Notebook before lunch. Closed the screen. Had lunch. Came back opened up and the pages I was working on had Kernel crashes and upon reloading said 500: Internal Server Error. I have upgraded, downgraded, restarted Jupyter, Windows, etc and nothing is working. What I find most puzzling is literally nothing happened to trigger this. I did not and had not updated anything. Same as I had always done many morning before to go to lunch. Below is the terminal log on start up with Jupyter. Any help greatly appreciated

[I 15:03:02.024 NotebookApp] JupyterLab extension loaded from C:\Users\tm649\anaconda3\lib\site-packages\jupyterlab  
[I 15:03:02.024 NotebookApp] JupyterLab application directory is C:\Users\tm649\anaconda3\share\jupyter\lab  
NumExpr defaulting to 8 threads.  
[W 15:03:03.079 NotebookApp] Error loading server extension panel  
Traceback (most recent call last):  
File “C:\Users\tm649\anaconda3\lib\site-packages\notebook\notebookapp.py”, line 1942, in init\_server\_extensions  
mod = importlib.import\_module(modulename)  
File “C:\Users\tm649\anaconda3\lib\importlib\__init_\_.py”, line 127, in import\_module  
return _bootstrap.gcd\_import(name[level:], package, level)  
File “”, line 1014, in gcd\_import  
File “”, line 991, in find\_and\_load  
File “”, line 975, in find\_and\_load\_unlocked  
File “”, line 671, in load\_unlocked  
File “”, line 783, in exec\_module  
File “”, line 219, in call\_with\_frames\_removed  
File "C:\Users\tm649\anaconda3\lib\site-packages\panel\_init.py", line 3, in   
from . import layout # noqa  
File "C:\Users\tm649\anaconda3\lib\site-packages\panel\layout\_init.py", line 1, in   
from .accordion import Accordion # noqa  
File “C:\Users\tm649\anaconda3\lib\site-packages\panel\layout\accordion.py”, line 5, in   
from .base import NamedListPanel  
File “C:\Users\tm649\anaconda3\lib\site-packages\panel\layout\base.py”, line 13, in   
from …io.model import hold  
File "C:\Users\tm649\anaconda3\lib\site-packages\panel\io\_init.py", line 8, in   
from …config import config  
File “C:\Users\tm649\anaconda3\lib\site-packages\panel\config.py”, line 20, in   
from .io.notebook import load\_notebook  
File “C:\Users\tm649\anaconda3\lib\site-packages\panel\io\notebook.py”, line 16, in   
import bokeh.embed.notebook  
File "C:\Users\tm649\anaconda3\lib\site-packages\bokeh\embed\_init.py", line 23, in   
from .server import server\_document, server\_session  
File “C:\Users\tm649\anaconda3\lib\site-packages\bokeh\embed\server.py”, line 25, in   
from …core.templates import AUTOLOAD\_REQUEST\_TAG, FILE  
File “C:\Users\tm649\anaconda3\lib\site-packages\bokeh\core\templates.py”, line 42, in   
from jinja2 import Environment, FileSystemLoader, Markup  
ImportError: cannot import name ‘Markup’ from ‘jinja2’ (C:\Users\tm649\anaconda3\lib\site-packages\jinja2\_init.py)  
[I 15:03:03.095 NotebookApp] Serving notebooks from local directory: C:\Users\tm649  
[I 15:03:03.095 NotebookApp] Jupyter Notebook 6.1.4 is running at:  
[I 15:03:03.095 NotebookApp] [http://localhost:8888/](http://localhost:8888/)  
[I 15:03:03.095 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).  
[E 15:03:14.484 NotebookApp] Uncaught exception GET /notebooks/Python/XXX/YYY\_trn.ipynb (::1)  
HTTPServerRequest(protocol=‘http’, host=‘localhost:8888’, method=‘GET’, uri=‘/notebooks/Python/XXX/YYY\_trn.ipynb’, version=‘HTTP/1.1’, remote\_ip=‘::1’)  
Traceback (most recent call last):  
File “C:\Users\tm649\anaconda3\lib\site-packages\tornado\web.py”, line 1703, in execute  
result = await result  
File “C:\Users\tm649\anaconda3\lib\site-packages\tornado\gen.py”, line 748, in run  
yielded = self.gen.send(value)  
File “C:\Users\tm649\anaconda3\lib\site-packages\notebook\notebook\handlers.py”, line 95, in get  
self.write(self.render\_template(‘notebook.html’,  
File “C:\Users\tm649\anaconda3\lib\site-packages\notebook\base\handlers.py”, line 512, in render\_template  
return template.render(\*\*ns)  
File “C:\Users\tm649\anaconda3\lib\site-packages\jinja2\environment.py”, line 1304, in render  
self.environment.handle\_exception()  
File “C:\Users\tm649\anaconda3\lib\site-packages\jinja2\environment.py”, line 939, in handle\_exception  
raise rewrite\_traceback\_stack(source=source)  
File “C:\Users\tm649\anaconda3\lib\site-packages\notebook\templates\notebook.html”, line 1, in top-level template code  
{% extends “page.html” %}  
File “C:\Users\tm649\anaconda3\lib\site-packages\notebook\templates\page.html”, line 154, in top-level template code  
{% block header %}  
File “C:\Users\tm649\anaconda3\lib\site-packages\notebook\templates\notebook.html”, line 115, in block ‘header’  
{% for exporter in get\_frontend\_exporters() %}  
File “C:\Users\tm649\anaconda3\lib\site-packages\notebook\notebook\handlers.py”, line 23, in get\_frontend\_exporters  
from nbconvert.exporters.base import get\_export\_names, get\_exporter  
File "C:\Users\tm649\anaconda3\lib\site-packages\nbconvert\_init.py", line 4, in   
from .exporters import \*  
File "C:\Users\tm649\anaconda3\lib\site-packages\nbconvert\exporters\_init.py", line 3, in   
from .html import HTMLExporter  
File “C:\Users\tm649\anaconda3\lib\site-packages\nbconvert\exporters\html.py”, line 14, in   
from jinja2 import contextfilter  
ImportError: cannot import name ‘contextfilter’ from ‘jinja2’ (C:\Users\tm649\anaconda3\lib\site-packages\jinja2\_init_.py)  
[E 15:03:14.503 NotebookApp] {  
“Host”: “localhost:8888”,  
“Connection”: “keep-alive”,  
“Sec-Ch-Ua”: “"Chromium";v="128", "Not;A=Brand";v="24", "Google Chrome";v="128"”,  
“Sec-Ch-Ua-Mobile”: “?0”,  
“Sec-Ch-Ua-Platform”: “"Windows"”,  
“Upgrade-Insecure-Requests”: “1”,  
“User-Agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36”,  
“Accept”: “text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,_/_;q=0.8,application/signed-exchange;v=b3;q=0.7”,  
“Sec-Fetch-Site”: “same-origin”,  
“Sec-Fetch-Mode”: “navigate”,  
“Sec-Fetch-User”: “?1”,  
“Sec-Fetch-Dest”: “document”,  
“Referer”: “[http://localhost:8888/tree/Python/XXX](http://localhost:8888/tree/Python/XXX)”,  
“Accept-Encoding”: “gzip, deflate, br, zstd”,  
“Accept-Language”: “en-US,en;q=0.9”,  
“Cookie”: “\_xsrf=2|234697f5|b73d2aa684898c2c79fc945d4abc6f21|1724183859; username-localhost-8888="2|1:0|10:1726077450|23:username-localhost-8888|44:MWU2YmE4OGIzYmYxNDYwZDk2Mjg4MjY4YjY2YjMxMGE=|e529eb564174795b80deb1b561a5dc310c5859e708abb97c49d7496756abb48e"; username-localhost-8889="2|1:0|10:1726079119|23:username-localhost-8889|44:OWQwMDY0M2Y5NTI4NDA3OWIyODIxYzU5MTRkNWI0NTg=|c86af6c7b699b41c9fd8093380c9bf63c5fcd4bc3557c070c7822b29e9cb2e42"”
