Hello
I'm trying to write a Python script which takes a csv list with IP addresses and connects to these IPs.
I have already managed to parse the csv file and entered the IP addresses but I can't get bpy.ops.crowdrender.send_connect_msg to work.
The error msg I'm getting is this:
Python: Traceback (most recent call last):
File "C:\Users\Admin\OneDrive\Desktop\crowdrender.blend\operator_simple.py", line 48, in <module>
File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\scripts\modules\bpy\ops.py", line 115, in _call_
ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Python: Traceback (most recent call last):
File "C:\Users\Admin\OneDrive\Desktop\crowdrender.blend\operator_simple.py", line 25, in execute
File "C:\Users\Admin\OneDrive\Desktop\crowdrender.blend\operator_simple.py", line 12, in main
File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\scripts\modules\bpy\ops.py", line 113, in _call_
ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Python: Traceback (most recent call last):
File "C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\crowdrender\cr_source\bl_addon\ui_operators.py", line 3871, in execute
bpy.app.handlers.save_post.remove(self.save_file_handler)
ValueError: list.remove(x): x not in list
Location: C:\Program Files\Blender Foundation\Blender 3.2\3.2\scripts\modules\bpy\ops.py:113
Location: C:\Program Files\Blender Foundation\Blender 3.2\3.2\scripts\modules\bpy\ops.py:115
And the code I'm trying to run:
node_dict = {}
node_name = bpy.data.scenes['Scene'].crowd_render.cr_nodes[0].name
node_dict[node_name] = bpy.context.scene.crowd_render.cr_nodes.get(node_name)
bpy.data.scenes['Scene'].crowd_render.cr_nodes[0].node_address = 'xxx.xxx.xxx.xxx'
bpy.ops.crowdrender.connect_node()
bpy.ops.crowdrender.send_connect_msg(node_dict)
(I'm trying to at least get it to work with one node and the rest should be easy once I have this)
From what I can see - it tries to remove a save_file_handler which should be added in the invoke() block of said operator.
I'm new to scripting in blender so maybe it is something trivial I'm missing but I'd appreciate any help I can get
Hi :)
Have you looked at the code in the addon itself to understand how the operators you are using work?
Our code is open source, so you can see exactly how we use them by looking at the addon package you have on your system :)