← Back to team overview

kicad-developers team mailing list archive

Pcbnew Python Interface breakage?


I just updated KiCad on Linux Mint using the Launchpad PPA to test the
new connection algorithm. However, a SWIG error starts to pop up in my
python plugins.
Right now I can produce the error, when calling GetDrawings on the board
object (which worked a few days ago). It looks like the SWIG wrappers
are desynchronized from the C++-code. Is that (at all) possible?

This is the Traceback I get:

Traceback (most recent call last):

  File "/home/sk/.kicad_plugins/action_viafence/viafence_action.py",
line 160, in Run
    boardItem = self.boardObj.GetDrawings().GetFirst()

  File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 18508, in
    def GetDrawings(self):            return self.m_Drawings

  File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 17803, in <lambda>
    __getattr__ = lambda self, name: _swig_getattr(self, BOARD, name)

  File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 74, in
    return _swig_getattr_nondynamic(self, class_type, name, 0)

  File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 69, in
    return object.__getattr__(self, name)

AttributeError: type object 'object' has no attribute '__getattr__'

Best Regards

Follow ups