Traceback (most recent call last):
File "C:\Users/Admin/Documents/KiCad/9.0/scripting\plugins\TextPostionSize\TextPosSize_dialog.py", line 120, in onProcessAction
self.process_text(self.text_type)
File "C:\Users/Admin/Documents/KiCad/9.0/scripting\plugins\TextPostionSize\TextPosSize_dialog.py", line 203, in process_text
self.set_text(text_type,position=5)
File "C:\Users/Admin/Documents/KiCad/9.0/scripting\plugins\TextPostionSize\TextPosSize_dialog.py", line 150, in set_text
self.clear_fields(footprint)
File "C:\Users/Admin/Documents/KiCad/9.0/scripting\plugins\TextPostionSize\TextPosSize_dialog.py", line 257, in clear_fields
for index, field in fields:
TypeError: 'SwigPyObject' object is not iterable
fields = footprint.GetFields()
for index, field in fields:
if index>5:
field.SetVisible(False)
I want to hide the encapsulated redundant fields, and an error is reported here, is it impossible to get the field object?
\TextPostionSize\TextPosSize_dialog.py", line 150, in set_text
self.clear_fields(footprint)
File "C:\Users/Admin/Documents/KiCad/9.0/scripting\plugins\TextPostionSize\TextPosSize_dialog.py", line 256, in clear_fields
for index, field in enumerate(fields):
^^^^^^^^^^^^^^^^^
TypeError: 'SwigPyObject' object is not iterable
You are not actually calling GetFootprints, so your variable footprints is being assigned to be a “pointer” to the GetFootprints method rather than a list of footprints.
I uninstalled and then installed the latest version of the nightly version today and the error still appeared. I suspect it’s the nightly version code that is broken