Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCB image blank #19

Open
grego1981 opened this issue Aug 4, 2021 · 3 comments
Open

PCB image blank #19

grego1981 opened this issue Aug 4, 2021 · 3 comments

Comments

@grego1981
Copy link

Hi and congrats on this concept!
I'm trying to generate the diagram but it comes back as blank pngs..
What I did was to install pinion via pip3 and WSL (ubuntu20.04) in Windows 10, at first some libraries were missing (imagemagick and Wand) which I installed as well. Then I had to install kicad in WSL as well because it couldn't locate the pcbnew module.
Then I ran :
pinion template --board bench-PSU.kicad_pcb --output bpsu.yaml
and a yaml was generated, and then I ran:
pinion generate --board bench-PSU.kicad_pcb --specification bpsu.yaml .
which only generated some warnings like the one below:
Warning: component 'PinHeader_1x02_P2.54mm_Vertical.back' for footprint 'SW5' from library 'Connector_PinHeader_2.54mm' was not found

And finally I ran:
pinion serve -b --directory .

And the page opened had the pins working hovering the mouse and clicking them but the PCB was a blank image. I tried the pngs directly with paint and indeed they were blanks....

What can I see to make it work?

@yaqwsx
Copy link
Owner

yaqwsx commented Aug 4, 2021

This a probably because of incompatible versions of Inkscape and ImageMagick installed. Please see the discussion (linked to relevant issues) here: yaqwsx/PcbDraw#48 (comment)

@grego1981
Copy link
Author

Tried the patch you suggest and installed the suggested imagemagick version described in linked issue: ImageMagick/ImageMagick#3564
Then the error changed:

Traceback (most recent call last):
File "/home/grego/.local/bin/pinion", line 8, in
sys.exit(cli())
File "/home/grego/.local/lib/python3.8/site-packages/click/core.py", line 1137, in call
return self.main(*args, **kwargs)
File "/home/grego/.local/lib/python3.8/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/home/grego/.local/lib/python3.8/site-packages/click/core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/grego/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/grego/.local/lib/python3.8/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/home/grego/.local/lib/python3.8/site-packages/pinion/ui.py", line 83, in generate
generate(specification=yaml.load(specification),
File "/home/grego/.local/lib/python3.8/site-packages/pinion/generate.py", line 213, in generate
fSource = generateImage(board.GetFileName(), outputdir / "front.png",
File "/home/grego/.local/lib/python3.8/site-packages/pinion/generate.py", line 142, in generateImage
svgToBitmap(svgfilename, outputfilename, dpi)
File "/home/grego/.local/lib/python3.8/site-packages/pinion/generate.py", line 112, in svgToBitmap
binaryBlob = image.make_blob(type)
File "/home/grego/.local/lib/python3.8/site-packages/wand/image.py", line 9581, in make_blob
with self.convert(format) as converted:
File "/home/grego/.local/lib/python3.8/site-packages/wand/image.py", line 9539, in convert
cloned = self.clone()
File "/home/grego/.local/lib/python3.8/site-packages/wand/image.py", line 3348, in clone
return Image(image=self)
File "/home/grego/.local/lib/python3.8/site-packages/wand/image.py", line 9131, in init
self.raise_exception()
File "/home/grego/.local/lib/python3.8/site-packages/wand/resource.py", line 222, in raise_exception
raise e
wand.exceptions.DrawError: non-conforming drawing primitive definition `circle' @ error/draw.c/RenderMVGContent/4470

@yaqwsx
Copy link
Owner

yaqwsx commented Mar 4, 2022

The situation with ImageMagick being constantly broken made me rewrite the conversion handling in PcbDraw. You can install the upstream version of PcbDraw and then, it should work just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants