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

write_html opens browser to relative rather than absolute path, doesn't handle absolute paths as name #278

Open
norweeg opened this issue Apr 3, 2024 · 0 comments · May be fixed by #279

Comments

@norweeg
Copy link

norweeg commented Apr 3, 2024

from pyvis.network import Network
from itertools import combinations

nodes = [n for n in range(10)]
edges = list(combinations(nodes, 2))

nt = Network()
nt.add_nodes(nodes)
nt.add_edges(edges)
# correctly writes file, but opens browser to relative path ./complete_graph.html, which is invalid
nt.write_html("complete_graph.html")
python 3.12.1
ipython 8.21.0
ipykernel 6.29.2
jupyter_client 8.6.0
pyvis 0.3.1

additionally, write_html does not handle fully qualified paths at all

norweeg added a commit to norweeg/pyvis that referenced this issue Apr 3, 2024
@norweeg norweeg linked a pull request Apr 3, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant