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

TypeError: FOOTPRINT_GetBoundingBox expected at most 2 arguments, got 3 #476

Closed
omerk opened this issue Oct 28, 2024 · 2 comments
Closed

Comments

@omerk
Copy link

omerk commented Oct 28, 2024

Hi,

Using the latest nightly (kicad-nightly-8.99.0.2837.g1dfe431c00), and current main (5915a24), ibom fails with error: TypeError: FOOTPRINT_GetBoundingBox expected at most 2 arguments, got 3.

The full error message:

---------------------------
Exception on python action plugin code
---------------------------
Traceback (most recent call last):

  File "C:\Users\omerk\Documents\KiCad\8.99\3rdparty\plugins\org_openscopeproject_InteractiveHtmlBom\ecad\kicad.py", line 841, in Run
    self.icon_file_name = os.path.join(icon_dir, 'icon.png')
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\omerk\Documents\KiCad\8.99\3rdparty\plugins\org_openscopeproject_InteractiveHtmlBom\core\ibom.py", line 363, in run_with_dialog
    main(parser, config, logger)

  File "C:\Users\omerk\Documents\KiCad\8.99\3rdparty\plugins\org_openscopeproject_InteractiveHtmlBom\core\ibom.py", line 327, in main
    pcbdata, components = parser.parse()
                          ^^^^^^^^^^^^^^

  File "C:\Users\omerk\Documents\KiCad\8.99\3rdparty\plugins\org_openscopeproject_InteractiveHtmlBom\ecad\kicad.py", line 758, in parse
    if bbox is None:
                     

  File "C:\Users\omerk\Documents\KiCad\8.99\3rdparty\plugins\org_openscopeproject_InteractiveHtmlBom\ecad\kicad.py", line 519, in parse_footprints
    for f in self.footprints:
                             ^

  File "C:\Program Files\KiCad\8.99\bin\Lib\site-packages\pcbnew.py", line 19937, in GetBoundingBox
    return _pcbnew.FOOTPRINT_GetBoundingBox(self, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

TypeError: FOOTPRINT_GetBoundingBox expected at most 2 arguments, got 3
Additional information:
Wrong number or type of arguments for overloaded function 'FOOTPRINT_GetBoundingBox'.
  Possible C/C++ prototypes are:
    FOOTPRINT::GetBoundingBox() const
    FOOTPRINT::GetBoundingBox(bool) const

Looking at other issues, it looks there might some interface changes that are not finalised in Kicad that the plugin might not support yet? Wondering if there's a workaround for now that we can use while those changes are ironed out?

Thanks for your assistance and your continued work on one of the greatest productivity boosters in the EDA space!

@qu1ck
Copy link
Member

qu1ck commented Oct 28, 2024

Your stack trace looks all messed up, this usually happens if your source does not match the code that is running. Make sure you have rebooted kicad after you changed the plugin.
The particular issue should be fixed, you just need to properly pick up the changes from master.

@omerk
Copy link
Author

omerk commented Oct 28, 2024

Not entirely sure what happened there but it's entirely possible that I may not have restarted KiCAD after overwriting the plugins folder with a zipball from Github. I think I just assumed that if I closed the PCB editor it would be okay, but evidently not.

Upon restarting KiCAD, and running the plugin, I got:

TypeError: PAD.GetRoundRectCornerRadius() missing 1 required positional argument: 'aLayer'

Which, after applying the workaround in #471 (comment) disappeared.

All working now, thanks for your help!

@omerk omerk closed this as completed Oct 28, 2024
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

2 participants