whitequark / kicad-boardview

KiCAD to Boardview exporter reads KiCAD PCB layout files and writes ASCII Boardview files
BSD Zero Clause License
152 stars 23 forks source link

Windows10 import module error #6

Closed GISED-Link closed 8 months ago

GISED-Link commented 4 years ago

Hi,

I try to generate a board.brd file using your python program on my Windows10 computer.

I use this trick to successfuly import pcbnew module: https://forum.kicad.info/t/running-kicad-python-scripts-on-windows/11465/2

then I try to run this command:

"C:\Program Files\KiCad\bin\python.exe" pcbnew2boardview.py "my\absolute\path\my_board.kicad_pcb" board.brd

And I have this output:

Traceback (most recent call last):
  File "pcbnew2boardview.py", line 7, in <module>
    import pcbnew
  File "pcbnew.py", line 1182, in <module>
    PCB_PAD_T = _pcbnew.PCB_PAD_T
AttributeError: 'module' object has no attribute 'SCH_HIER_LABEL_T'

Do you have any idea of the problem ?


kicad info: KiCad version : Version: (5.1.0)-1, release build Libraries: wxWidgets 3.0.4 libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0 Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW Build Info: wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) Boost: 1.68.0 OpenCASCADE Community Edition: 6.9.1 Curl: 7.61.1 Compiler: GCC 8.2.0 with C++ ABI 1013

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

whitequark commented 4 years ago

No idea, sorry.

nickoe commented 4 years ago

@GISED-Link Why are you using that old version of kicad? Try to update to at least 5.1.6.

whitequark commented 8 months ago

KiCad 5 is not supported anymore.