Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gracefully handle plugin loading failure #4994

Merged
merged 6 commits into from
Jul 22, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update autogpt/plugins/__init__.py
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
  • Loading branch information
eyalk11 and Pwuts authored Jul 17, 2023
commit 459c0aa068c0538072f7827578d27f7126ee1f70
7 changes: 1 addition & 6 deletions autogpt/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,7 @@ def scan_plugins(config: Config, debug: bool = False) -> List[AutoGPTPluginTempl
f"Zipped plugins should use the class name ({plugin_name}) as the key."
)
else:
module_name = (
a_module.__name__
if hasattr(a_module, "__name__")
else str(a_module)
)
if module_name != "AutoGPTPluginTemplate":
if getattr(a_module, "__name__", str(a_module)) != "AutoGPTPluginTemplate":
logger.debug(
f"Skipping '{key}' because it doesn't subclass AutoGPTPluginTemplate."
)
Expand Down