_dispatch() got an unexpected keyword argument 'kwargs'

I have tried to create repair option in pyblish_qml
But every time i click repair button it show this error
I found _dispatch method only in client.py but it seems like this error linked to another one
I tried to run tests from mocking.py but it didn’t work either
Any ideas ?
Maya 2018

Thank you !

Hi @sega_m, could you share what versions you have there currently?

import pyblish
import pyblish_qml


And could you share how you’ve created your repair option? Is it using Actions, or some other mechanism? Are you implementing the deprecated repair() method on plug-ins?

See here for a summary of what and when “Actions” were introduced.

Hi @marcus, thanks for help = ) versions are:

I just copy paste examples from mocking.py, i have tried this 2:

class ValidateDIWithRepair(pyblish.api.Validator):
    families = ["diFamily"]
    optional = True
    __fail__ = True

    def process(self, instance):
        assert False, "I was programmed to fail, for repair"

    def repair(self, instance):
        self.log.info("Repairing %s" % instance.data("name"))

class ValidateWithRepairFailure(pyblish.api.Validator):
    """A validator with repair functionality that fails"""
    optional = True
    families = ["C"]
    __fail__ = True

    def process_instance(self, instance):
        assert False, "%s is invalid, try repairing it!" % instance.name

    def repair_instance(self, instance):
        self.log.info("Attempting to repair..")
        assert False, "Could not repair due to X"

The only thing i changed is family

Ok, yes those are deprecated (since years ago!) :slight_smile: Give Actions a try, they can do repair too.

1 Like