Panel 1.4 runtime error but not in notebook

Hi I upgraded panel to v 1.4.0 via Conda. Bokeh was also upgraded by the installer.
I now get an error:

Last login: Tue Apr  9 16:35:44 on console
 panel serve --port=80 ... nem_review_1.21.ipynb --global-loading-spinner  --reuse-sessions --warm
ERROR: Error loading  ...  nem_review_1.21.ipynb:

Invalid syntax in 'nem_review_1.21.ipynb' on line 1724:
       "  background-color: #00DCDC;\n",

Traceback (most recent call last):
  File "//anaconda3/lib/python3.11/site-packages/bokeh/application/handlers/", line 104, in __init__
    nodes = ast.parse(source, os.fspath(path))
  File "anaconda3/lib/python3.11/", line 50, in parse
    return compile(source, filename, mode, flags,
  File "//Desktop/nem_review_1.21.ipynb", line 1724
    "  background-color: #00DCDC;\n",
SyntaxError: invalid syntax

Never previously did I get such an error.
Also the Jupyter Notebook runs as expected (and as it has run for months)
The error is in table styling dictionary:

# itk teal style for data frame doesn't print the borders properly in vscode but does in jupyter
styles  = [dict(selector="caption",
       props=[("text-align", "left"),
              ("font-size", "150%"),
              ("color", 'white'),
              ("background-color", "teal"),
              ("caption-side", "top")]),
              dict(selector = "",props =[("color","grey"),("background-color",'white'),('border-bottom', '1px dotted grey')]),
              dict(selector = "th",props =[("background-color",'white'),('border-bottom', '1px dotted grey'),('min_width','300px')]),
              dict(selector = "tr",props =[("background-color",'white'),('border-bottom', '1px dotted grey'),("color","black")]),
              dict(selector = ".blank",props =[("background-color",'#00DCDC')]),
              dict(selector = "th.col_heading",props =[("color",'black'),('font-size','110%'),("background-color",'#00DCDC')]),
              dict( selector = "tr:last-child", props =[("color","black"),('border-bottom', '5px black')])]

Any assistance would be appreciated

Python is 3.11 and pandas 2.2.0

Downgrading to Panel 1.3.6 which downgraded Bokeh to 3.3.4 and now my code is running.

So I do feel something in the upgrade caused an error, which if I was to guess, and I am an ancient financial analyst by training and career and no programmer, is due to the way Bokeh stitches the notebook into a script.

But that suggestion is likely a red herring.