Pyblish plugins doesnt get removed from GUI after pyblish.api.deregister_all_plugins()

Hi all.

In my script i use:

print "1", pyblish.api.registered_paths()
print "2", pyblish.api.registered_plugins()

to clear previously used scripts and to confirm deregistration.

Then i register new ones with

print "3", pyblish.api.registered_paths()
print "4", pyblish.api.registered_plugins()

I register plugins after what families I’ve written in the plugin classes docstring and in register_plugins i use pyblish.api.register_plugin(obj) only…
Then i show the gui, pyblish_lite.

So far everything works but when i run this script again but with different plugins the previous plugins will also show up in the GUI, together with the new plugins.

print pyblish.api.registered_plugins()
print pyblish.api.registered_paths()

after deregistration shows that the old plugins are gone and calling

print pyblish.api.registered_plugins()
print pyblish.api.registered_paths()

after registering the new plugins shows that only the new plugins are registered.
Then i proceed to show pyblish lite and there the new and old plugins show up.

Any ideas?


Hi @hamaro,

Thanks for reporting this! Some questions…

What is this command? Do you mean this?

from pyblish import api

If so, what is docstring_families? That command takes a single plug-in as argument.

Sorry I’m not sure what you mean here.

Are you able to post something I can reproduce on my end?

To find out how pyblish_lite discovers plug-ins, you can find the source here.

Looks like this, where pluginList contains full length paths to plugin .py files
I guess nevermind what i wrote about families, they get turned out into the paths that go into pluginList :slight_smile:
import imp
def register_plugins(families):

#register the plugins
for pluginfile in pluginList:
    module = imp.load_source('', pluginfile)
    for name, obj in inspect.getmembers(module):
        if inspect.isclass(obj):

I can’t tell what’s happening there. imp.load_source is effectively what does to registered plug-in paths already. Why not register their parent directory?

Maybe if you posted something I could run on my end that demonstrates the problem it would be easier to help.

It’s a long-shot, but somewhat related and potentially useful to your case; have you seen the latest feature on filtering the discovery of plug-ins that got added a few days ago?

from pyblish import api

class ExcludeMe(api.ContextPlugin):
    order = api.CollectorOrder

class ChangeMe(api.InstancePlugin):
    order = api.ValidatorOrder
    optional = False

def my_filter(plugins):
    for plugin in plugins[:]:  # use [:] to avoid editing whilst looping

        # Plug-ins can be removed..
        if plugin.__name__ not in ("ChangeMe",):

        # ..and modified
        if plugin.__name__ == "ChangeMe":
            plugin.optional = True


plugins =

assert len(plugins) == 1
assert plugins[0] is ChangeMe
assert ChangeMe.optional is True


Hey Marcus, there was an error on my side.
False alarm, sorry.

Thanks for your suggestions!

1 Like