yaqwsx / PcbDraw

Convert your KiCAD board into a nicely looking 2D drawing suitable for pinout diagrams
MIT License
1.13k stars 90 forks source link

Unknown layer ID -1 #133

Closed Khalinda closed 1 year ago

Khalinda commented 1 year ago

I just ran PcbDraw for the first time, so maybe I'm doing it wrong. I'm running Windows 11 with KiCAD 6.0.9. I opened a KiCAD command window and I entered a command like:

pcbdraw plot "test.kicad_pcb" "test.svg"

I obtained the following error message:

wx._core.wxAssertionError: C++ assertion ""false"" failed at ....\common\layer_id.cpp(180) in LayerName(): Unknown layer ID -1

PcbDraw got as far as creating a minimal .SVG file n a temp directory.

yaqwsx commented 1 year ago

Could you share the source board? All tests are passing and I struggle to reproduce this.

Khalinda commented 1 year ago

Here is a board that was created in KiCAD 5.x. I pulled it into KiCAD 6.0.9 to convert it to 6.x then I ran PcbDraw and I obtained the ID -1 error. Do you need anything other than the kicad_pcb file? Card.zip

yaqwsx commented 1 year ago

What you observe is incompatibility with KiCAD 6.0.9. This was already fixed upstream, but it wasn't released. I just made a v1.0.0 release. Upgrade, and it should work:

card

Khalinda commented 1 year ago

Thanks. That works.