iterating through g.nodes returns None eventually
Open
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.