yaqwsx / PcbDraw

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

KiCad v8 AttributeError "no attribute 'VIA'" #163

Closed lowie2727 closed 7 months ago

lowie2727 commented 7 months ago

when running the pcbdraw plot command i get the following error:

Traceback (most recent call last):
  File "/home/lowie/Downloads/temp/python-venv/bin/pcbdraw", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/home/lowie/.local/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lowie/.local/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/lowie/.local/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lowie/.local/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lowie/.local/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lowie/Downloads/temp/python-venv/lib64/python3.12/site-packages/pcbdraw/ui.py", line 180, in plot
    image = plotter.plot()
            ^^^^^^^^^^^^^^
  File "/home/lowie/Downloads/temp/python-venv/lib64/python3.12/site-packages/pcbdraw/plot.py", line 1054, in plot
    plotter.render(self)
  File "/home/lowie/Downloads/temp/python-venv/lib64/python3.12/site-packages/pcbdraw/plot.py", line 640, in render
    self._plotter.execute_plot_plan(to_plot)
  File "/home/lowie/Downloads/temp/python-venv/lib64/python3.12/site-packages/pcbdraw/plot.py", line 1226, in execute_plot_plan
    action.action(action.name, os.path.join(tmp, svg_file))
  File "/home/lowie/Downloads/temp/python-venv/lib64/python3.12/site-packages/pcbdraw/plot.py", line 678, in _process_outline
    for hole in collect_holes(self._plotter.board):
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lowie/Downloads/temp/python-venv/lib64/python3.12/site-packages/pcbdraw/plot.py", line 589, in collect_holes
    via_type = pcbnew.VIA if LEGACY_KICAD else pcbnew.PCB_VIA
               ^^^^^^^^^^
AttributeError: module 'pcbnewTransition.pcbnew' has no attribute 'VIA'
yaqwsx commented 7 months ago

Solved with #164 .