The weights for the command "Graph.comunity_edge_betweenness()"

Hi everyone,
I want to use the command “Graph.community_edge_betweenness()” in order to divide my network into sub networks. When I get the vertex weights by the command “Graph.edge_betweenness()” and enter as weights in “Graph.community_edge_betweenness(weights=w)” for 2 clusters (condition1), there is not any differences in shown results with the results of condition that I do not enter weights(condition2) but, for 3 clusters, the shown clusters are different for both condition! So, first question is that how I can get the right weights for clusters more than 3 clusters and the second is that why these differences do appear?
Thanks

It is unclear what you mean. Can you show a complete minimal example that illustrates your question?

the first code is :
import igraph
g=igraph.Graph.Read(‘exp1.txt’, directed=False)
d=g.community_edge_betweenness(clusters=3)
p=d.as_clustering()
l=[(40,0), (10,10), (20,10), (30,10), (40,10), (50,10), (30,20), (40,20), (50,20), (30,30), (40,30)]
igraph.plot(g,layout=l)

the second is :
import igraph
g=igraph.Graph.Read(‘exp1.txt’, directed=False)
w=g.edge_betwenness()
d=g.community_edge_betweenness(clusters=3, weights=w)
p=d.as_clustering()
l=[(40,0), (10,10), (20,10), (30,10), (40,10), (50,10), (30,20), (40,20), (50,20), (30,30), (40,30)]
igraph.plot(g,layout=l)

But why there are differences between the shown communities(three clusters)?
thanks

Can you make the example self-contained? We don’t have the data. Ideally, come up with a minimal example that does not require an external data file.

Also, please format your post for readability (code should go in code blocks!)