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

Plugin mechanism doesn't work #791

Open
3 tasks done
abetis opened this issue Jan 31, 2025 · 2 comments
Open
3 tasks done

Plugin mechanism doesn't work #791

abetis opened this issue Jan 31, 2025 · 2 comments

Comments

@abetis
Copy link

abetis commented Jan 31, 2025

Prerequisites

  • I have read FAQ
  • I have searched existing issues (including closed ones)
  • I use KiKit at least version 1.6.0 (older version are not supported)

KiKit version

kikit, version 1.6.0

KiCAD version

8.0.8

Operating system

Ubuntu 22.04

Description

Copied the plugin.py to the project local directory.
In JSON configuration I have this section:
"fiducials": {
"type": "plugin",
"code": "plugin.py.FiducialsPlugin"
}

But kikit throws this error:
An error occurred: Error in section fiducials: Invalid plugin type specified, FiducialsPlugin expected

I followed the plugins explanation page. plugin.py as it's available from: kikit/plugin.py
The file have the class "FiducialsPlugin".

Was expecting to see the "Fiducials plugin has to provide buildFiducials" exception from the default plugins.py file, but something fails before that.

Steps to Reproduce

Copy the plugin.py to the project local directory.
In JSON configuration I have this section:
"fiducials": {
"type": "plugin",
"code": "plugin.py.FiducialsPlugin"
}

But kikit throws this error:
An error occurred: Error in section fiducials: Invalid plugin type specified, FiducialsPlugin expected

@yaqwsx
Copy link
Owner

yaqwsx commented Jan 31, 2025

Since you haven't provided the code, it is hard to judge. But I guess your plugin doesn't inherit from a FiducialsPlugin.

@abetis
Copy link
Author

abetis commented Jan 31, 2025

Can't I use the default FiducialsPlugin class implementation from the plugin.py just to see the "Fiducials plugin has to provide buildFiducials" error thrown in order to see that everything is set up correctly?

Is there an example with a simple class that inherit from the FiducialsPlugin class?
I'm not a Python person...

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