https://prefect.io logo
Title
m

Marwan Sarieddine

07/06/2021, 6:29 PM
Hi Folks, a question about prefect artifacts and jupyter notebooks I am exporting a notebook to markdown and saving it as an artifact on prefect cloud but I am unable to make the following render correctly • latex • tables in html (when trying to display a pandas dataframe) • images (when trying to display plots)
This screenshot shows that the latex is still in its raw format the pandas dataframe table is shown in raw html and the image just shows a png icon
This is the task code that saves the notebook
nb: nbformat.NotebookNode = pm.execute_notebook(
        path,
        "-",
        parameters=parameters,
        kernel_name=kernel_name,
        log_output=log_output,
    )
    exporter = nbconvert.get_exporter("markdown")
    markdown, _ = nbconvert.export(exporter, nb)
    prefect.artifacts.create_markdown(markdown)
n

nicholas

07/06/2021, 6:34 PM
Hi @Marwan Sarieddine - artifacts don't support tex* math operations at the moment as it would require adding math ml or something similar (which the parser doesn't use)
As for tables and images, those should work but the parsing might be failing cause of the math inserts you have, which usually interrupt normal html doc parsing
m

Marwan Sarieddine

07/06/2021, 6:36 PM
thanks @nicholas for responding promptly I see - so I suppose as a first step I can retry the notebook without the latex for now
n

nicholas

07/06/2021, 6:36 PM
Yeah give that a shot and let me know if you're still seeing issues with tables/images
m

Marwan Sarieddine

07/06/2021, 6:36 PM
ok will do - thanks