soundmonster / samoklava

Generated keyboard
MIT License
337 stars 191 forks source link

pcbdraw fails when running Docker locally #28

Closed TildeWill closed 9 months ago

TildeWill commented 10 months ago

I'm on OSX, running the repo from a clean checkout of what's currently main HEAD d5f78f63a1e78360cb03efc049de3ee2ea600c02

When I get to this step of make setup clean all

 docker run -w /board -v /Users/readwl/workspace/keyboards/magellan:/board --rm yaqwsx/kikit:v0.7 pcbdraw --style builtin:oshpark-afterdark.json output/routed_pcbs/board.kicad_pcb output/routed_pcbs/board-front.png

I get this output/error:

Traceback (most recent call last):
  File "/usr/local/bin/pcbdraw", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/pcbdraw/pcbdraw.py", line 793, in main
    board_cont.append(get_board_substrate(board, style, not args.no_drillholes, args.back))
  File "/usr/local/lib/python3.8/dist-packages/pcbdraw/pcbdraw.py", line 445, in get_board_substrate
    process(container, f, os.path.join(tmp, svg_file), colors, boardsize)
  File "/usr/local/lib/python3.8/dist-packages/pcbdraw/pcbdraw.py", line 329, in process_board_substrate_base
    clipPath.append(get_board_polygon(extract_svg_content(read_svg_unique(source))))
  File "/usr/local/lib/python3.8/dist-packages/pcbdraw/pcbdraw.py", line 277, in get_board_polygon
    elements.append(SvgPathItem(svg_element.attrib["d"]))
  File "/usr/local/lib/python3.8/dist-packages/pcbdraw/pcbdraw.py", line 52, in __init__
    raise SyntaxError("Only paths with absolute position are supported")
SyntaxError: Only paths with absolute position are supported

Researching this error seems to point to an old version of kikit, but upgrading the image from 0.7 to 1.x seems to do away with the pcbdraw command, so I'm at a loss for what to do. I see that the Github action passed pretty recently so I assume this is something about my environment. Any help would be appreciated!

hedefalk commented 9 months ago

@TildeWill

I'm doing this in my fork:

kikit ?= yaqwsx/kikit:v1.3.0

…
output/routed_pcbs/%-front.png: output/routed_pcbs/%.kicad_pcb
    mkdir -p $(shell dirname $@)
    ${container_cmd} run --entrypoint pcbdraw ${container_args} ${kikit} plot --style oshpark-afterdark.json $< $@

output/routed_pcbs/%-back.png: output/routed_pcbs/%.kicad_pcb
    mkdir -p $(shell dirname $@)
    ${container_cmd} run --entrypoint pcbdraw ${container_args} ${kikit} plot --side back --style oshpark-afterdark.json $< $@
TildeWill commented 9 months ago

Thanks @hedefalk! What changes did you make to the gerbers step that also references kitkit? I get this error:

Board 'output/routed_pcbs/<MY BOARD NAME>.kicad_pcb' has no project, cannot read DRC exclusions

TildeWill commented 9 months ago

Disregard, I see there's already a PR that answers my question