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

[BUG] job fails with wks #466

Closed
MarkusSBS opened this issue Jul 19, 2023 · 6 comments
Closed

[BUG] job fails with wks #466

MarkusSBS opened this issue Jul 19, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@MarkusSBS
Copy link

MarkusSBS commented Jul 19, 2023

Describe the bug
After Migrationg from kicad 6 to 7.0.5
If a use my own Wks template for the pdf export of the PCB i get errors and the export fails.
The export works without a WKS

- 'PDF for the PCB' (print_pcb_pdf) [pcb_print]
./pcbnew/board_item.cpp(39): assert "m_group == nullptr" failed in ~BOARD_ITEM().
,,,,,,,,,
./pcbnew/board_item.cpp(39): assert "m_group == nullptr" failed in ~BOARD_ITEM().
./pcbnew/board_item.cpp(39): assert "m_group == nullptr" failed in ~BOARD_ITEM().
./pcbnew/board_item.cpp(39): assert "m_group == nullptr" failed in ~BOARD_ITEM().
./pcbnew/board_item.cpp(39): assert "m_group == nullptr" failed in ~BOARD_ITEM().
./pcbnew/board_item.cpp(39): assert "m_group == nullptr" failed in ~BOARD_ITEM().
WARNING:(W045) Pad with solder paste, but no copper or solder mask aperture in U26 (kibot - out_base.py:412)
WARNING:(W045) Pad with solder paste, but no copper or solder mask aperture in U16 (kibot - out_base.py:412)
Traceback (most recent call last):
  File "/usr/local/bin/kibot", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/dist-packages/kibot/__main__.py", line 520, in main
    generate_outputs(outputs, args.target, args.invert_sel, args.skip_pre, args.cli_order, args.no_priority,
  File "/usr/local/lib/python3.9/dist-packages/kibot/kiplot.py", line 527, in generate_outputs
    _generate_outputs(outputs, targets, invert, skip_pre, cli_order, no_priority, dont_stop)
  File "/usr/local/lib/python3.9/dist-packages/kibot/kiplot.py", line 517, in _generate_outputs
    run_output(out, dont_stop)
  File "/usr/local/lib/python3.9/dist-packages/kibot/kiplot.py", line 418, in run_output
    out.run(get_output_dir(out.dir, out))
  File "/usr/local/lib/python3.9/dist-packages/kibot/out_base.py", line 197, in run
    self.options.run(self.expand_filename(output_dir, output))
  File "/usr/local/lib/python3.9/dist-packages/kibot/out_pcb_print.py", line 1[207](https://gitlab.intra.smart-battery-solutions.de/hardware/emob2/-/jobs/13541#L207), in run
    self.generate_output(output)
  File "/usr/local/lib/python3.9/dist-packages/kibot/out_pcb_print.py", line 1155, in generate_output
    self.plot_frame_internal(pc, po, p, len(pages)+1, len(self.pages))
  File "/usr/local/lib/python3.9/dist-packages/kibot/out_pcb_print.py", line 516, in plot_frame_internal
    ws.draw(GS.board, self.cleared_layer, page, self.paper_w, self.paper_h, tb_vars)
  File "/usr/local/lib/python3.9/dist-packages/kibot/kicad/worksheet.py", line 544, in draw
    e.draw(self)
  File "/usr/local/lib/python3.9/dist-packages/kibot/kicad/worksheet.py", line 384, in draw
    s.Rotate(pos, e.rotate*10)
  File "/usr/lib/python3/dist-packages/pcbnew.py", line 9541, in Rotate
    return _pcbnew.BOARD_ITEM_Rotate(self, aRotCentre, aAngle)
TypeError: in method 'BOARD_ITEM_Rotate', argument 2 of type 'VECTOR2I const &'

The Configuraton i use:

 - name: 'print_pcb_pdf'
    comment: "PDF for the PCB"
    type: pcb_print
    dir: PCB_Docu
    options:
      svg_precision: 6
      realistic_solder_mask: false
      force_edge_cuts: true
      keep_temporal_files: false
      #enable_ki6_frame_fix: true
      scaling: 1.0
      pages:
        - layers: [ F.SilkS, Dwgs.User ]
          sheet: 'Top Silk layer'
        - layers: [ F.Mask, Dwgs.User ]
          sheet: 'Top Mask layer'
        - layers: [ F.Cu, Dwgs.User ]
          sheet: '%ld (%ln)'
          repeat_for_layer: F.Cu
          repeat_layers: copper
        - layers: [ B.Mask, Dwgs.User ]
          sheet: 'Bottom Mask layer'
        - layers: [ B.SilkS, Dwgs.User ]
          sheet: 'Bottom layer'
        - layers: [ F.Paste,Dwgs.User]
          sheet: 'Top paste Fabrication layers'
        - layers: [ B.Paste,Dwgs.User]
          sheet: 'Bottom paste Fabrication layers'
      output: "${SBS_SAP}_%p-%v_Rev%r-%i_${SBS_Doc_status}_%D-%T.%x"

Environment (please complete the following information):
Where are you running KiBot:

  • In a CI/CD workflow? GitLab
  • Using a docker image? ghcr.io/inti-cmnb/kicad7_auto_full:dev
@MarkusSBS
Copy link
Author

i cheched the deebug outbut und it fails on drawing the frame:

DEBUG:- Plotting the frame (kibot - out_pcb_print.py:1149)
Traceback (most recent call last):
  File "/usr/local/bin/kibot", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/dist-packages/kibot/__main__.py", line 520, in main
    generate_outputs(outputs, args.target, args.invert_sel, args.skip_pre, args.cli_order, args.no_priority,
  File "/usr/local/lib/python3.9/dist-packages/kibot/kiplot.py", line 527, in generate_outputs
    _generate_outputs(outputs, targets, invert, skip_pre, cli_order, no_priority, dont_stop)
  File "/usr/local/lib/python3.9/dist-packages/kibot/kiplot.py", line 517, in _generate_outputs
    run_output(out, dont_stop)
  File "/usr/local/lib/python3.9/dist-packages/kibot/kiplot.py", line 418, in run_output
    out.run(get_output_dir(out.dir, out))
  File "/usr/local/lib/python3.9/dist-packages/kibot/out_base.py", line 197, in run
    self.options.run(self.expand_filename(output_dir, output))
  File "/usr/local/lib/python3.9/dist-packages/kibot/out_pcb_print.py", line 1207, in run
    self.generate_output(output)
  File "/usr/local/lib/python3.9/dist-packages/kibot/out_pcb_print.py", line 1155, in generate_output
    self.plot_frame_internal(pc, po, p, len(pages)+1, len(self.pages))
  File "/usr/local/lib/python3.9/dist-packages/kibot/out_pcb_print.py", line 516, in plot_frame_internal
    ws.draw(GS.board, self.cleared_layer, page, self.paper_w, self.paper_h, tb_vars)
  File "/usr/local/lib/python3.9/dist-packages/kibot/kicad/worksheet.py", line 544, in draw
    e.draw(self)
  File "/usr/local/lib/python3.9/dist-packages/kibot/kicad/worksheet.py", line 384, in draw
    s.Rotate(pos, e.rotate*10)
  File "/usr/lib/python3/dist-packages/pcbnew.py", line 9541, in Rotate
    return _pcbnew.BOARD_ITEM_Rotate(self, aRotCentre, aAngle)
TypeError: in method 'BOARD_ITEM_Rotate', argument 2 of type 'VECTOR2I const &'

@set-soft
Copy link
Member

Hallo @MarkusSBS !
Check if the last commit fixes it. (6f8586e)
It worked for a simple 45º rotated logo.

@MarkusSBS
Copy link
Author

MarkusSBS commented Jul 21, 2023

it sill fails but with a different error

DEBUG:- Plotting the frame (kibot - out_pcb_print.py:1149)
Traceback (most recent call last):
File "/usr/local/bin/kibot", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.9/dist-packages/kibot/main.py", line 520, in main
generate_outputs(outputs, args.target, args.invert_sel, args.skip_pre, args.cli_order, args.no_priority,
File "/usr/local/lib/python3.9/dist-packages/kibot/kiplot.py", line 527, in generate_outputs
_generate_outputs(outputs, targets, invert, skip_pre, cli_order, no_priority, dont_stop)
File "/usr/local/lib/python3.9/dist-packages/kibot/kiplot.py", line 517, in _generate_outputs
run_output(out, dont_stop)
File "/usr/local/lib/python3.9/dist-packages/kibot/kiplot.py", line 418, in run_output
out.run(get_output_dir(out.dir, out))
File "/usr/local/lib/python3.9/dist-packages/kibot/out_base.py", line 197, in run
self.options.run(self.expand_filename(output_dir, output))
File "/usr/local/lib/python3.9/dist-packages/kibot/out_pcb_print.py", line 1207, in run
self.generate_output(output)
File "/usr/local/lib/python3.9/dist-packages/kibot/out_pcb_print.py", line 1155, in generate_output
self.plot_frame_internal(pc, po, p, len(pages)+1, len(self.pages))
File "/usr/local/lib/python3.9/dist-packages/kibot/out_pcb_print.py", line 516, in plot_frame_internal
ws.draw(GS.board, self.cleared_layer, page, self.paper_w, self.paper_h, tb_vars)
File "/usr/local/lib/python3.9/dist-packages/kibot/kicad/worksheet.py", line 544, in draw
e.draw(self)
File "/usr/local/lib/python3.9/dist-packages/kibot/kicad/worksheet.py", line 384, in draw
s.Rotate(GS.p2v_k7(pos), e.rotate*10)
File "/usr/lib/python3/dist-packages/pcbnew.py", line 9541, in Rotate
return _pcbnew.BOARD_ITEM_Rotate(self, aRotCentre, aAngle)
TypeError: in method 'BOARD_ITEM_Rotate', argument 3 of type 'EDA_ANGLE const &'

My logo is not rotated or it is not intentional rotated in other than 90° increments

Using docker image sha256:1a60d6555436e3913856993e72317d0a0cc1edc6cee8cf5cba8f39e01ae36d15 for ghcr.io/inti-cmnb/kicad7_auto_full:dev with digest ghcr.io/inti-cmnb/kicad7_auto_full@sha256:bf60d917d3a2bc7c0c62f11e40991edd565de8fb7c8e18551aae9e9d704f71ac

@set-soft
Copy link
Member

Hi @MarkusSBS !
If you need it working soon edit the .kicad_wks and remove any rotate sentence in the polygon blocks.
It worked here and I won't have time to investigate it for some days,

set-soft added a commit that referenced this issue Jul 21, 2023
@set-soft set-soft added the bug Something isn't working label Jul 21, 2023
@set-soft
Copy link
Member

Hallo @MarkusSBS !
I found some time to look into the issue. Should be fixed now.
Please let me know if the above patch solves your case.

@MarkusSBS
Copy link
Author

yes it works now thanks for the fast help with this problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants