1
$\begingroup$

I am building custom nodes that operate on messages generated by an external source. I have developed Python classes that encapsulate these messages. I have a Blender addon that gathers a collection of these message objects and a custom node that packages multiple messages into plain old Python lists. I want pass these lists down stream to other custom modes across a socket. I have having trouble understanding List Sockets. I get "NoneType is not iterable" errors on even the simplest of implementations. I understand what the error means, but not why its being generated. Any pointers on where I should start? Also, is there any way to increase the fidelity of the diagnostic messages in Python / Blender / AN? I find that the stack traces and other information provided by these errors are not very helpful. Thanks All, Mike

$\endgroup$
  • $\begingroup$ I find that the error occurs when I have registered two or more of the custom sockets as outputs. self.outputs.new("an_ChannelMessageSocket", "Channel 1", "chan1") self.outputs.new("an_ChannelMessageSocket", "Channel 2", "chan2") $\endgroup$ – MikeCh May 21 '16 at 20:29
  • 3
    $\begingroup$ Would be useful if you could share some more information. eg the code of the socket, an image of the node setup etc. Not sure which additional information on the error you need.. $\endgroup$ – Jacques Lucke May 21 '16 at 21:07
1
$\begingroup$

The solution is pretty obvious, but here it is in case someone else has a similar problem. The problem was not with the socket but in the node, and the problem was that the node's execute() method must return a collection of N items where N is the number of output sockets.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.