yaqwsx / PcbDraw-Lib

Model library for PcbDraw - https://github.com/yaqwsx/PcbDraw
Other
40 stars 19 forks source link

create_template.py: Remove spurious argument in pcbdraw.get_layers() #14

Closed dzarda closed 3 years ago

dzarda commented 3 years ago

Does this without the proposed change:

Traceback (most recent call last):
  File "C:\Users\Dzarda\Downloads\PcbDraw-Lib-master\scripts\create_template.py", line 210, in <module>
    cli()
  File "C:\Program Files\KiCad\5.99\bin\lib\site-packages\click\core.py", line 1134, in __call__
    return self.main(*args, **kwargs)
  File "C:\Program Files\KiCad\5.99\bin\lib\site-packages\click\core.py", line 1059, in main
    rv = self.invoke(ctx)
  File "C:\Program Files\KiCad\5.99\bin\lib\site-packages\click\core.py", line 1665, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Program Files\KiCad\5.99\bin\lib\site-packages\click\core.py", line 1401, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Program Files\KiCad\5.99\bin\lib\site-packages\click\core.py", line 767, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\Dzarda\Downloads\PcbDraw-Lib-master\scripts\create_template.py", line 172, in run_board
    g = plotBottomLayers(fBoard)
  File "C:\Users\Dzarda\Downloads\PcbDraw-Lib-master\scripts\create_template.py", line 95, in plotBottomLayers
    elements = pcbdraw.get_layers(board, colors, {}, plotPlan)
TypeError: get_layers() takes 3 positional arguments but 4 were given
yaqwsx commented 3 years ago

The argument isn't spurious. What's happening is that you have an incompatible (old) version of PcbDraw installed. There was a change about 2 months ago: https://github.com/yaqwsx/PcbDraw/commit/1e2c3fe46864ee68a0f4e689e870860824c466a8

dzarda commented 3 years ago

Understood sorry