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

Cannot download pdf format from renderer #191

Open
alex180500 opened this issue Feb 8, 2024 · 1 comment
Open

Cannot download pdf format from renderer #191

alex180500 opened this issue Feb 8, 2024 · 1 comment

Comments

@alex180500
Copy link

When trying to download a Cairo plot from the jupyter notebook renderer (image/svg+xml from ms-toolsai/jupyter-renderers) I'm unable to download the pdf format (I click save as pdf but nothings happens). The SVG save file works fine.

When opening the Plots using "Expand image" button there is another save button which can save in SVG, PNG (both working fine) and also PDF which gives an error

19:29:06.896 [info] exporting plot...
19:29:14.669 [info] Attempting pdf write...
19:29:14.669 [error] [TypeError: Invalid host defined options
	at iL (~\.vscode\extensions\ms-toolsai.jupyter-2024.1.1-win32-x64\dist\extension.node.js:362:62189)
	at kI.exportPlot (~\.vscode\extensions\ms-toolsai.jupyter-2024.1.1-win32-x64\dist\extension.node.js:362:61723)]

This is the code I used to replicate the bug (it uses the igraph library with pycairo)

import igraph as ig
graph = ig.Graph.Lattice((3, 3))
ig.plot(graph, layout="grid")

Versions
vscode 1.86.1
jupyter v2024.1.1
jupyter notebook renderers v1.0.17
python-igraph 0.11.3
pycairo 1.25.1

@alex180500
Copy link
Author

Another issue arises when trying to rerun the cell. If I try to open again the "Expand image" I get the following error:

19:44:13.823 [error] No SVG or PNG Plot to open ~\##myfolder##\issue_igraph.ipynb, id: 2e3711a7-dbf9-4bce-be8a-fae6257d88f5

I first have to clear the output then I have to click again and it works. This issue is not present for the matplotlib inline rendering.

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

1 participant