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

update to newer kicad API #3

Open
fenugrec opened this issue Nov 19, 2023 · 0 comments
Open

update to newer kicad API #3

fenugrec opened this issue Nov 19, 2023 · 0 comments

Comments

@fenugrec
Copy link

fenugrec commented Nov 19, 2023

I'd like to try this on current Kicad (7), but running into issues :

AttributeError: 'BOARD' object has no attribute 'GetModules'

Ok, replace GetModules( with Footprints( seems to help.

AttributeError: module 'pcbnew' has no attribute 'BOARD_GetStandardLayerName'

Ok, a bit tricker, not sure if strictly correct : replace that bit with pcbnew.BOARD.GetLayerName(pcb,layer)

And then, this one has me stumped :

Traceback (most recent call last):
  File "..../kicad_picknplace_assistant.py", line 220, in <module>
    create_board_figure(pcb, bom_row, layer=layer)
  File "..../kicad_picknplace_assistant.py", line 16, in create_board_figure
    ax = plt.subplot("111", aspect="equal")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/matplotlib/pyplot.py", line 1425, in subplot
    key = SubplotSpec._from_subplot_args(fig, args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/matplotlib/gridspec.py", line 574, in _from_subplot_args
    raise ValueError(
ValueError: Single argument to subplot must be a three-digit integer, not '111'

isn't 111 already a three-digit integer ?
[EDIT] well that error was surely written by the Sphinx, the code has "111" instead of 111 !

Next :

AttributeError: 'FOOTPRINT' object has no attribute 'GetFootprintRect

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

1 participant