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

Error: 'PCB_TARGET' object has no attribute 'GetShapeStr' #4

Open
exislow opened this issue Nov 5, 2021 · 4 comments
Open

Error: 'PCB_TARGET' object has no attribute 'GetShapeStr' #4

exislow opened this issue Nov 5, 2021 · 4 comments

Comments

@exislow
Copy link

exislow commented Nov 5, 2021

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'

This is my PCB:
grafik

What have I done wrong?

@asukiaaa
Copy link
Owner

asukiaaa commented Dec 6, 2021

Thank you for sharing the problem.
Can you share the project?
I want to reproduce the problem on my PC.

@odaki
Copy link
Contributor

odaki commented Dec 6, 2021

Hello @exislow.
This problem has been fixed by #3 .
Please try the latest version.

@exislow
Copy link
Author

exislow commented Dec 10, 2021

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
Copy link
Author

exislow commented Dec 10, 2021

I have tried the docker version: Works like charm.

@odaki odaki mentioned this issue Dec 29, 2021
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

3 participants