Trying to create a networkX graph to render on bokeh.
I have also tried using the kamada_kawai_layout
network_graph = from_networkx(G, nx.spring_layout, scale=10, center=(0, 0))
network_graph = from_networkx(G, nx.spring_layout, scale=10, center=(0, 0))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/bokeh/plotting/graph.py", line 123, in from_networkx
graph_renderer.layout_provider = StaticLayoutProvider(graph_layout=graph_layout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/bokeh/models/graphs.py", line 83, in __init__
super().__init__(*args, **kwargs)
File "/opt/homebrew/lib/python3.11/site-packages/bokeh/models/graphs.py", line 66, in __init__
super().__init__(*args, **kwargs)
File "/opt/homebrew/lib/python3.11/site-packages/bokeh/model/model.py", line 110, in __init__
super().__init__(**kwargs)
File "/opt/homebrew/lib/python3.11/site-packages/bokeh/core/has_props.py", line 295, in __init__
setattr(self, name, value)
File "/opt/homebrew/lib/python3.11/site-packages/bokeh/core/has_props.py", line 327, in __setattr__
return super().__setattr__(name, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/bokeh/core/property/descriptors.py", line 332, in __set__
value = self.property.prepare_value(obj, self.name, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/bokeh/core/property/bases.py", line 364, in prepare_value
raise ValueError(f"failed to validate {obj_repr}.{name}: {error}")
ValueError: failed to validate StaticLayoutProvider(id='p1052', ...).graph_layout: expected an element of Dict(Int, Seq(Any)), got {'6': array([-5.70519103, 0.71927349]), '21': array([-1.62685515, 0.65761607]),