gephi / gephi/gephi-plugins

iterating through g.nodes returns None eventually

Open
#19 10 comments 0 reactions 0 assignees View on GitHub
python-scripting-plugin
Dominant language
No language data
Stars
292
Forks
645
PR merge metrics
No merged PRs in 30d

Description

(console script plugin)

I'm iterating over g.nodes and changing the color of a node according to its position

f = #scaling factor from X,Y range to RGB range
for v in g.nodes: color_node(v)

def color_node(v):
x, y = v.position
r = int(x_f)
b = int(y_f)
v.color = Color(r, 0 ,b)

it works for a few nodes until it throws an exception as NoneType has not position attribute. I don't see why it should eventually reach a None object. Data Table shows no empty rows, same iteration with only print(v) also doesn't fail. could be some concurrency related stuff.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.