kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #17633
Re: Python scripting error in today's compile
On Mon, Mar 30, 2015 at 12:35 AM, Nathan McCorkle <nmz787@xxxxxxxxx> wrote:
> On Mon, Mar 30, 2015 at 12:19 AM, Nathan McCorkle <nmz787@xxxxxxxxx> wrote:
>> I get this error output:
>> http://paste.pound-python.org/show/UzjU6mujUSJnnY76vzfW/
>
> I changed SEGVIA to SEGZONE and the output got much further, but then
> produced this error at the end of the output:
> http://paste.pound-python.org/show/AsGLtFoM1e1kpz8AxyLz/
>
> ending at:
> LIST ZONES:
> Traceback (most recent call last):
> File "inspect.py", line 50, in <module>
> for zone in pcb.GetSegZones():
> File "/home/nathan/Projects/github/kicad-source-mirror/build_install/usr/local/lib/python2.7/dist-packages/pcbnew.py",
> line 3902, in <lambda>
> __getattr__ = lambda self, name: _swig_getattr(self, BOARD, name)
> File "/home/nathan/Projects/github/kicad-source-mirror/build_install/usr/local/lib/python2.7/dist-packages/pcbnew.py",
> line 57, in _swig_getattr
> raise AttributeError(name)
> AttributeError: GetSegZones
I see this method exists GetNumSegZone, and something called m_Zone...
I wonder if the code would be like this (I can't test as GetNumSegZone
returns 0 for me):
for zone in range(pcb.GetNumSegZone()):
print pcb.m_Zone[zone]
Any ideas how to test this?
References