(Grasshopper Python script) Same Script, Same input, Different result

I am new to rhino grasshopper
I have a grasshopper python script, which gives me a Runtime error:
(MissingMemberException): ‘str’ object has no attribute ‘BranchCount’

But the Same script, same input, runs smoothly in another grasshopper file.
unsuccessful one:
unsuccess_script.gh (4.8 KB)

successful one:
success_script.gh (5.1 KB)

i cant spot any difference. Can anyone tell me the reason behind this?

I found the difference finally,
the input type needs to change to ‘tree access’

1 Like