After Update - Markdown cells are not rendered anymore

Hi,

I installed a jupyterhub server quite some time ago. Today I updated both the server and Python packages.Now the rendered markdown cells are not shown anymore, the souce cod is there, when I click on a cell, but evaluating the cell yeilds nothing.

The code “forschung.info()” also returns Markdown and results in:

Javascript Error: Cannot read properties of undefined (reading ‘theme’)

What could be the source of the problem? Or a solution? Or how could I find that out?

Any hints are highly appreciated!
Thank you very much!

Marc

I’m not sure how forschung works or what it is, but this is likely an issue that this package doesn’t work with the version of JupyterLab you are using. Since it’s publishing Javascript to evaluate code in the browser, that is sensitive to versions of the frontend UI (JupyterLab).

Make sure both are up to date, and if it still doesn’t work, report the issue to forschung author(s). If that’s you, you’ll need to check with the javascript code you are publishing and the context in which it executes.

1 Like

Hi,

thank you for your fast reply.

info() simply returns a help text in Markdown form

def info():
    infotext = '''
### Es stehen folgende Funktionen zur Verfügung:
| Funktion           | Beschreibung |
|:-------------------|:-------------|
|info()  | Diese Information zur Forschungsdatenbank |
|sql(sql_statement, index_column = None) | Ausführen des sql statements sql_statement...  |
|tabellen() | Es wird eine Liste aller in der Datenbank zur Verfügung stehenden Tabellen zurückgeliefert. Es steht eine Beschreibung zur Verfügung.|
    '''
    display(Markdown(infotext))

but all Markdown cells are not rendered!
If I double click on the “not visible” cell, the Markdown source is shown…

partially done here:

The browser console shows tons of errors like:

jlab_core.23e8a6b191d1fa15c1b7.js?v=23e8a6b191d1fa15c1b7:1  Failed to render TypeError: Cannot read properties of undefined (reading 'theme')
    at get baseMarkdownItOptions (999.cd895bd57407720ae82f.js?v=cd895bd57407720ae82f:1:4512)
    at p.getOptions (999.cd895bd57407720ae82f.js?v=cd895bd57407720ae82f:1:4112)
    at p.getMarkdownIt (999.cd895bd57407720ae82f.js?v=cd895bd57407720ae82f:1:3652)
    at g.render (999.cd895bd57407720ae82f.js?v=cd895bd57407720ae82f:1:674)
    at g.renderModel (jlab_core.23e8a6b191d1fa15c1b7.js?v=23e8a6b191d1fa15c1b7:1:1286324)
    at Ke._updateRenderedInput (jlab_core.23e8a6b191d1fa15c1b7.js?v=23e8a6b191d1fa15c1b7:1:267535)
    at Ke._handleRendered (jlab_core.23e8a6b191d1fa15c1b7.js?v=23e8a6b191d1fa15c1b7:1:267214)
    at Ke.onUpdateRequest (jlab_core.23e8a6b191d1fa15c1b7.js?v=23e8a6b191d1fa15c1b7:1:266838)
    at Ke.processMessage (jlab_core.23e8a6b191d1fa15c1b7.js?v=23e8a6b191d1fa15c1b7:1:1781107)
    at b (jlab_core.23e8a6b191d1fa15c1b7.js?v=23e8a6b191d1fa15c1b7:1:1753611)
(anonym) @ jlab_core.23e8a6b191d1fa15c1b7.js?v=23e8a6b191d1fa15c1b7:1
336.0a90bd910629a565bb7e.js?v=0a90bd910629a565bb7e:1  Failed to fetch ipywidgets through the "jupyter.widget.control" comm channel, fallback to fetching individual model state. Reason: Control comm was closed too early
_loadFromKernel @ 336.0a90bd910629a565bb7e.js?v=0a90bd910629a565bb7e:1

So ipywidgets seems to be causing the issue, right?

Inspecting this further, there seems to be a mismatch with various libraries

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
jupyter-server-ydoc 0.8.0 requires jupyter-ydoc<0.4.0,>=0.2.0, but you have jupyter-ydoc 2.0.1 which is incompatible.
jupyter-server-ydoc 0.8.0 requires ypy-websocket<0.9.0,>=0.8.2, but you have ypy-websocket 0.12.4 which is incompatible.
jupyterlab-markup 2.0.0 requires jupyterlab==3.*,>=3.0, but you have jupyterlab 4.1.5 which is incompatible.

I tried to resolve this, but getting further errors with the dependency :cold_face:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
fastapi 0.110.0 requires starlette<0.37.0,>=0.36.3, but you have starlette 0.37.2 which is incompatible.
jupyterlab-markup 2.0.0 requires jupyterlab==3.*,>=3.0, but you have jupyterlab 4.1.5 which is incompatible.

I am not that experienced with the python environment, is there a means to resove this?

Thank you very much!

Marc

Ah, yes, it does appear to be a problem with the jupyterlab-markup package. Try uninstalling it. You don’t need jupyterlab-markup to view rendered markdown.

1 Like

Hi,

I removed it and

pip install --force-reinstall -v “starlette==0.36.3”
pip install --force-reinstall -v “ypy-websocket==0.8.4”
pip install --force-reinstall -v “jupyter-ydoc==0.3.4”
pip install --force-reinstall -v “jupyterlab==3.6.5”

working now. Thank you very much!

:+1: :+1: :+1:

Marc

1 Like