faced with such an error: Local cdn resources have problems on chrome/safari when used in jupyter-notebook. It appears when working with the pyvis library.
net = Network(notebook=True)
net.add_nodes(
[1, 2, 3, 4, 5], # node ids
label=['Node #1', 'Node #2', 'Node #3', 'Node #4', 'Node #5'], # node labels
# node titles (display on mouse hover)
title=['Main node', 'Just node', 'Just node', 'Just node', 'Node with self-loop'],
color=['#d47415', '#22b512', '#42adf5', '#4a21b0', '#e627a9'] # node colors (HEX)
)
net.add_edges([(1, 2), (1, 3), (2, 3), (2, 4), (3, 5), (5, 1)])
net.show('graph.html')
I tried switching the browser to dataspell
From
pyvis
documentation:I did
net = Network(notebook=True, cdn_resources='in_line')
A note from me - you have to use 'in_line' instead of 'inline'. From sources:
Additionally,
pyvis
output render is an open feature request for DataSpell at the moment. Watch and upvote this ticket if you're interested: DS-3446