Skip to content

Conversation

@dewitweb
Copy link

What caused the error?
Calibre tried to open the plugin’s configuration dialog by calling:

config.ConfigWidget(self.plugin_path, self.alfdir)

That means Calibre passed two arguments (besides self):

plugin_path
alfdir

But in the original plugin code, the ConfigWidget class was defined like this:

def __init__(self, plugin_path):
    QWidget.__init__(self)

This constructor only accepted one argument (plugin_path). When Calibre passed two, Python raised:

TypeError: ConfigWidget.init() takes 2 positional arguments but 3 were given

What caused the error?
Calibre tried to open the plugin’s configuration dialog by calling:

config.ConfigWidget(self.plugin_path, self.alfdir)

That means Calibre passed two arguments (besides self):

plugin_path
alfdir

But in the original plugin code, the ConfigWidget class was defined like this:



    def __init__(self, plugin_path):
        QWidget.__init__(self)


This constructor only accepted one argument (plugin_path). When Calibre passed two, Python raised:

TypeError: ConfigWidget.__init__() takes 2 positional arguments but 3 were given
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

Successfully merging this pull request may close these issues.

1 participant