From 1567b49f8df65cef0de00d37c8f96522a64942b3 Mon Sep 17 00:00:00 2001 From: TheTechromancer Date: Wed, 26 Nov 2025 13:00:03 -0500 Subject: [PATCH 1/2] more helpful error message --- bbot/core/modules.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bbot/core/modules.py b/bbot/core/modules.py index b6165aaef3..5160ba49e0 100644 --- a/bbot/core/modules.py +++ b/bbot/core/modules.py @@ -460,7 +460,12 @@ def preload_module(self, module_file): def load_modules(self, module_names): modules = {} for module_name in module_names: - module = self.load_module(module_name) + try: + module = self.load_module(module_name) + except ModuleNotFoundError as e: + raise BBOTError( + f"Error loading module {module_name}: {e}. You may have leftover artifacts from an older version of BBOT. Try deleting/renaming your '~/.bbot' directory." + ) from e modules[module_name] = module return modules From c7bbfe775954c1ee36ab2cffbb8b62c596aada53 Mon Sep 17 00:00:00 2001 From: TheTechromancer Date: Wed, 26 Nov 2025 13:11:23 -0500 Subject: [PATCH 2/2] include version in deps hash --- bbot/core/helpers/depsinstaller/installer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bbot/core/helpers/depsinstaller/installer.py b/bbot/core/helpers/depsinstaller/installer.py index 934dad677f..1348ed077c 100644 --- a/bbot/core/helpers/depsinstaller/installer.py +++ b/bbot/core/helpers/depsinstaller/installer.py @@ -16,6 +16,7 @@ from ansible_runner.interface import run from subprocess import CalledProcessError +from bbot import __version__ from ..misc import can_sudo_without_password, os_platform, rm_at_exit, get_python_constraints log = logging.getLogger("bbot.core.helpers.depsinstaller") @@ -174,6 +175,7 @@ async def install(self, *modules): + self.venv + str(self.parent_helper.bbot_home) + os.uname()[1] + + str(__version__) ).hexdigest() success = self.setup_status.get(module_hash, None) dependencies = list(chain(*preloaded["deps"].values()))