Pinion: pinion generate throws error: pcbdraw returned non-zero exit status

Hi,

I have Ubuntu 20.04 through WSL on my Windows 10 Pro, pip installed Pinion, installed Kicad 6, installed imagemagick. (in that order, if that is important) Running the template command worked fine (then). When running the generate command, I encountered an issue I cannot resolve myself:

$ pinion generate -b …/ATMega4809_Breakout.kicad_pcb --specification diagram.yaml publish

Warning: component 'PinHeader_2x03_P2.54mm_Vertical' for footprint 'J2' from library 'Connector_PinHeader_2.54mm' was not found
Warning: component 'SW_Push_1P1T_NO_CK_KMR2' for footprint 'SW1' from library 'Button_Switch_SMD' was not found
Warning: component 'QFN-48-1EP_6x6mm_P0.4mm_EP4.2x4.2mm' for footprint 'U1' from library 'Package_DFN_QFN' was not foundWarning: component 'PinHeader_1x05_P2.54mm_Horizontal' for footprint 'J1' from library 'Connector_PinHeader_2.54mm' was not found
Warning: component 'LED_RGB_5050-6' for footprint 'D1' from library 'LED_SMD' was not found
Warning: component 'PinHeader_2x02_P2.54mm_Vertical' for footprint 'J3' from library 'Connector_PinHeader_2.54mm' was not found
Warning: component 'Crystal_DS26_D2.0mm_L6.0mm_Horizontal.back' for footprint 'Y1' from library 'Crystal' was not found
Traceback (most recent call last):
  File "/home/marius/.local/bin/pcbdraw", line 8, in <module>
    sys.exit(main())
  File "/home/marius/.local/lib/python3.8/site-packages/pcbdraw/pcbdraw.py", line 953, in main
    postprocess_svg(args.output, args.shrink)
  File "/home/marius/.local/lib/python3.8/site-packages/pcbdraw/pcbdraw.py", line 815, in postprocess_svg
    shrink_svg(svgfilepath, shrinkBorder)
  File "/home/marius/.local/lib/python3.8/site-packages/pcbdraw/pcbdraw.py", line 769, in shrink_svg
    paths = document.paths()
  File "/home/marius/.local/lib/python3.8/site-packages/svgpathtools/document.py", line 261, in paths
    return flattened_paths(self.tree.getroot(), group_filter,
  File "/home/marius/.local/lib/python3.8/site-packages/svgpathtools/document.py", line 143, in flattened_paths
    path = transform(parse_path(converter(path_elem)), path_tf)
  File "/home/marius/.local/lib/python3.8/site-packages/svgpathtools/path.py", line 309, in transform
    return transform_segments_together(curve, transformation)
  File "/home/marius/.local/lib/python3.8/site-packages/svgpathtools/path.py", line 191, in transform_segments_together
    transformed_segs = [transformation(seg) for seg in path]
  File "/home/marius/.local/lib/python3.8/site-packages/svgpathtools/path.py", line 191, in <listcomp>
    transformed_segs = [transformation(seg) for seg in path]
  File "/home/marius/.local/lib/python3.8/site-packages/svgpathtools/path.py", line 308, in <lambda>
    transformation = lambda seg: transform(seg, tf)
  File "/home/marius/.local/lib/python3.8/site-packages/svgpathtools/path.py", line 339, in transform
    return Arc(new_start, radius=new_radius, rotation=curve.rotation + rot,
  File "/home/marius/.local/lib/python3.8/site-packages/svgpathtools/path.py", line 1448, in __init__
    self._parameterize()
  File "/home/marius/.local/lib/python3.8/site-packages/svgpathtools/path.py", line 1503, in _parameterize
    raise ValueError("No such elliptic arc exists.")
ValueError: No such elliptic arc exists.
Traceback (most recent call last):
  File "/home/marius/.local/bin/pinion", line 8, in <module>
    sys.exit(cli())
  File "/home/marius/.local/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/marius/.local/lib/python3.8/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/marius/.local/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/marius/.local/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/marius/.local/lib/python3.8/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/marius/.local/lib/python3.8/site-packages/pinion/ui.py", line 83, in generate
    generate(specification=yaml.load(specification),
  File "/home/marius/.local/lib/python3.8/site-packages/pinion/generate.py", line 213, in generate
    fSource = generateImage(board.GetFileName(), outputdir / "front.png",
  File "/home/marius/.local/lib/python3.8/site-packages/pinion/generate.py", line 140, in generateImage
    subprocess.run(command, check=True)
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['pcbdraw', '--shrink', '0', '../ATMega4809_Breakout.kicad_pcb', '/tmp/tmppa6it2b7/img.svg']' returned non-zero exit status 1.

Is it an issue, that it does not find the libraries? I made the board under Windows, but would like to try out your tool.

What can I do?

Cheers, Marius

edt: When generated the template, I did not apply any changes to that. I don’t know if that is important.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 22 (11 by maintainers)

Most upvoted comments

It will work on WSL and Docker on Windows. It just cannot do it when run natively. Unfortunately, it seems that KiCAD 7 will still miss the essential API parts that would allow us to run it natively and work faster.

Pinion & Pcbdraw are undergoing large changes.

The currently released version uses hand-drawn components, and you need to supply them. There is no linkage to the 3D models in KiCAD. The default library is available at https://github.com/yaqwsx/PcbDraw-Lib, however, it is not complete and at the moment, doesn’t have all the changes that were introduced with KiCAD 6.

In the upcoming release (and already implemented in upstream, already visible in the upstream documentation), Pinion will support working on boards rendered via KiCAD preview. However, this option won’t be available on Windows due to the technical limitations of KiCAD.