← Back to team overview

kicad-developers team mailing list archive

Re: Pcbnew Python Interface breakage?

 

Well, of course it is not stable. In the nightly builds, nothing is
actually stable :-)

But I don't think there is a reason why these features are broken, and I
think it might be a small oversight when someone else made changes and
we should thus fix it.

Best Regards
Simon

Am 26.06.2017 um 11:21 schrieb reynaud:
> Hi,
> 
> Python interface is not stable. You can have some changes on daily build
> version.
> In your case, using PadsList() instead of Pads() should fix your issue.
> 
> 
> Le lundi 26 juin 2017 à 10:23 +0200, easyw a écrit :
>> Hi,
>> I can confirm the same error on windows 10.
>>
>> I get also an other kind of error in my annular plugin that worked till now
>>
>> "for pad in module.Pads():
>> TypeError 'SwigPyObject' object is not iterable"
>>
>> BR
>> Maurice
>>
>> On 06/25/2017 5:46 PM, Simon Küppers wrote:
>>> Hi, 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
>>> GetDrawings 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
>>> _swig_getattr return _swig_getattr_nondynamic(self, class_type, name,
>>> 0) File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 69, in
>>> _swig_getattr_nondynamic return object.__getattr__(self, name)
>>> AttributeError: type object 'object' has no attribute '__getattr__'
>>> Best Regards Simon _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers Post to :
>>> kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx> Unsubscribe :
>>> https://launchpad.net/~kicad-developers More help :
>>> https://help.launchpad.net/ListHelp 
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


Follow ups

References