jsreynaud / kicad-action-scripts

Some KiCad plugins in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FillAreaAction.py Error on Windows and Kicad 5.1

alborzs opened this issue · comments

Hi,
Anyone recognize this error:
image

Using ab13588

I am on the (latest 5.1) Kicad version:

Application: Pcbnew
Version: (5.1.10)-1, release build
Libraries:
    wxWidgets 3.0.5
    libcurl/7.71.0 OpenSSL/1.1.1g (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.41.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.73.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.71.0
    Compiler: GCC 10.2.0 with C++ ABI 1014

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

I am having the exact same error. Also with KiCad 5.1.10.

Could you try to change line 27 of file ViaStitching/FillAreaDialog.py:
from self.SetSizeHints to self.SetSizeHintsSz

And tell me...

I managed to find a workaround.
I usually go through Tools > External Plugins and then choose the plugin I like to run and that way results in the error above.
I had not noticed the extra icon to run the plugin in the toolbar, if I start the plugin in that way then it works just fine.

I now tried your suggestion and then it work flawlessly to be invoked from the Tools menu as well.
Line 27 in ViaStitching/FillAreaDialog.py changed to
self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )

For me it's like if you have a mix of version of python+wxwidget.

Your information about KiCad version report that you are using python2 and wxwidget < 4, but if code executed is line 27 of FillAreaDialog, it's mean that sys.version_info[0] (that represent the major version of python) is != 2 (ie python3). And your python3 version is calling import from python 2.7 (according your error message)...

The fact that it's working with icon and not by the menu is really strange too...

So for me it's really strange.

Close because any update