Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All Graphviz images inside Jupyter Notebooks are not being displayed when viewed on GitHub #182

Closed
EdwardSpaeth opened this issue Nov 7, 2022 · 4 comments

Comments

@EdwardSpaeth
Copy link

Short description

As mentioned in the title, all Graphviz images are not being rendered at all in Jupyter Notebooks when viewed on GitHub.
When viewed in a Jupyter Notebooks IDE like JupyterLab, everything is rendered correctly.
Only the view on GitHub seems to be affected.

Expected Behaviour

The first image is a simple example of a graphviz graph. Rendering it using "display(dot)" or just caling it with "dot" makes no difference in regards to the issue.
should_be_1

The second image is an example of graphviz usage in Jupyter Notebooks from this very repository, which is also affected by this problem.
Link to the example

should_be_3

This is how it is supposed to be. In order to get those images, I ran the corresponding code in the JuptyerLab IDE

Actual Behaviour

When viewing these Notebooks/Cells on GitHub, the images are not being displayed.
Here is the first image not being rendered

actually_is_1

and here is the example from this repository, which is also suffering from the same issue

actually_is_2

Additional information

It should be noted that:

I do not know when exactly the issue started, but I know for certain that this issue arose between October 12th and November 3rd.
Those two dates might seem specific, but I know for certain that on the 12th of October I was sure it was working and on the 3rd of November I made the discovery that it did not anymore. I cannot really shrink down that range and still be certain.

Another thing to note is that the issue occured without me having to change a file.
Just like the Jupyter Notebook of the example, the issue is present even if there were no commits to any given file in the timeframe mentioned above.
So it may be a change to GitHub itself, which broke the rendering. I do not know.

Nevertheless seeing as this repository is affected aswell, I thought it would be a good idea to post it here.

@xflr6
Copy link
Owner

xflr6 commented Nov 7, 2022

Thanks. It looks like this is specific to notebooks that contain SVGs. E.g. in https://github.com/xflr6/graphviz/blob/master/examples/graphviz-jupyter-format.ipynb the PNG output is still shown as expected.

AFAICT this is indeed an issue with GitHub (rendering of notebooks on GitHub has been broken before, see e.g. this issue).

It might be worth to look for (or create) a more minimal example of a notebook including an SVG that has this issue.

IIUC, the right place to report this might be here: https://github.com/community/community/discussions?discussions_q=notebook+label%3ABug

@xflr6
Copy link
Owner

xflr6 commented Nov 7, 2022

@xflr6
Copy link
Owner

xflr6 commented Nov 7, 2022

Just in case: a possible workaround is to use nbviewer, e.g. https://nbviewer.org/github/xflr6/graphviz/tree/master/examples/

@xflr6
Copy link
Owner

xflr6 commented Nov 16, 2022

Has been fixed, see community/community#12355 (reply in thread), closing.

@xflr6 xflr6 closed this as completed Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants