diff --git a/picard/pluginmanager.py b/picard/pluginmanager.py index 8d1d4a77dd..f7ac94c629 100644 --- a/picard/pluginmanager.py +++ b/picard/pluginmanager.py @@ -254,7 +254,9 @@ def _load_plugin_from_directory(self, name, plugindir): self.plugin_error(name, error, name, [plugindir]) return None - module_pathname = os.path.dirname(info.origin) + module_pathname = info.origin + if module_pathname.endswith("__init__.py"): + module_pathname = os.path.dirname(module_pathname) plugin = None try: