You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running LOTR example (Raphtory/examples/py/lotr ) using Python 3.11.4 with raphtory==0.6.1. Example worked after several changes based on latest API documentation.
1
Code Block:
graph = Graph(1)
**Error:**
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[1], line 7
5 structure_file = "lotr.csv"
6 properties_file = "lotr_properties.csv"
----> 7 graph = Graph(1)
TypeError: Graph.__new__() takes 0 positional arguments but 1 was given
2
Code Block:
print("Number of edges: %i" % len(graph.edges))
Error:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[30], line 5
3 print("Number of vertices: %i" % len(graph.vertices))
4 print(graph.edges)
----> 5 print("Number of edges: %i" % len(graph.edges))
TypeError: object of type 'builtins.Edges' has no len()
Example should be using graph.count_edges()
3
Code Block:
with open(properties_file, 'r') as csvfile:
datareader = csv.reader(csvfile)
for row in datareader:
graph.add_vertex_properties(row[0], {"race": row[1],"gender": row[2]})
Error:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[28], line 4
2 datareader = csv.reader(csvfile)
3 for row in datareader:
----> 4 graph.add_vertex_properties(row[0], {"race": row[1],"gender": row[2]})
AttributeError: 'builtins.Graph' object has no attribute 'add_vertex_properties'
Hi @abhishektiwari - as mentioned in #1332, since creating the documentation on raphtory.com this examples folder has become more of a test space than explicit using facing examples. I shall tidy this up today.
Running LOTR example (
Raphtory/examples/py/lotr
) using Python3.11.4
withraphtory==0.6.1
. Example worked after several changes based on latest API documentation.1
Code Block:
2
Code Block:
Error:
Example should be using
graph.count_edges()
3
Code Block:
Error:
For JOSS Review
The text was updated successfully, but these errors were encountered: