Error: 'PCB_TARGET' object has no attribute 'GetShapeStr'
exislow opened this issue · 4 comments
exislow commented
I have installed the plugin with KiCAD 5.1.10-1 on my macOS 11.6. If I try to click on export
using this plugin the following error appears:
Error: 'PCB_TARGET' object has no attribute 'GetShapeStr'
Traceback (most recent call last):
File "/Users/xxx/Library/Preferences/kicad/scripting/plugins/gerber_to_order/gerber_to_order_action.py", line 327, in OnExec
sizeLabel = createSizeLabelOfBoard(pcbnew.GetBoard())
File "/Users/xxx/Library/Preferences/kicad/scripting/plugins/gerber_to_order/outline_measure.py", line 106, in createSizeLabelOfBoard
wh = getWidthHeightMmOfBoard(board)
File "/Users/xxx/Library/Preferences/kicad/scripting/plugins/gerber_to_order/outline_measure.py", line 99, in getWidthHeightMmOfBoard
minMax2Dim = getMinMax2DimOfBoard(board)
File "/Users/xxx/Library/Preferences/kicad/scripting/plugins/gerber_to_order/outline_measure.py", line 71, in getMinMax2DimOfBoard
if draw.GetShapeStr() == 'Arc':
AttributeError: 'PCB_TARGET' object has no attribute 'GetShapeStr'
What have I done wrong?
asukiaaa commented
Thank you for sharing the problem.
Can you share the project?
I want to reproduce the problem on my PC.
exislow commented
Thanks for your effort. Currently I am on KiCad 5.99 (nightlies). After your patch I get the follwing error message:
Error: module 'pcbnew' has no attribute 'DRAWSEGMENT'
Traceback (most recent call last):
File "/Users/USER/Documents/KiCad/6.0/scripting/plugins/gerber_to_order/gerber_to_order_action.py", line 327, in OnExec
sizeLabel = createSizeLabelOfBoard(pcbnew.GetBoard())
File "/Users/USER/Documents/KiCad/6.0/scripting/plugins/gerber_to_order/outline_measure.py", line 106, in createSizeLabelOfBoard
wh = getWidthHeightMmOfBoard(board)
File "/Users/USER/Documents/KiCad/6.0/scripting/plugins/gerber_to_order/outline_measure.py", line 99, in getWidthHeightMmOfBoard
minMax2Dim = getMinMax2DimOfBoard(board)
File "/Users/USER/Documents/KiCad/6.0/scripting/plugins/gerber_to_order/outline_measure.py", line 70, in getMinMax2DimOfBoard
if type(draw) is pcbnew.DRAWSEGMENT and draw.GetLayerName() == 'Edge.Cuts':
AttributeError: module 'pcbnew' has no attribute 'DRAWSEGMENT'
exislow commented
I have tried the docker version: Works like charm.