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

Please update to support new version of Auto-GPT #18

Open
NeonN3mesis opened this issue Jun 29, 2023 · 1 comment
Open

Please update to support new version of Auto-GPT #18

NeonN3mesis opened this issue Jun 29, 2023 · 1 comment

Comments

@NeonN3mesis
Copy link

Please update the plugin and documentation. Thank you,

Traceback (most recent call last):
File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/app/autogpt/main.py", line 5, in
autogpt.cli.main()
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1635, in invoke
rv = super().invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/app/autogpt/cli.py", line 96, in main
run_auto_gpt(
File "/app/autogpt/main.py", line 124, in run_auto_gpt
config.plugins = scan_plugins(config, config.debug_mode)
File "/app/autogpt/plugins/init.py", line 270, in scan_plugins
plugin_enabled = plugins_config.is_enabled(plugin_name)
AttributeError: 'dict' object has no attribute 'is_enabled'

@ghost
Copy link

ghost commented Jul 17, 2023

The error message 'dict' object has no attribute ‘is_enabled' indicates that the code is trying to call a method is_enabled on a dictionary object, which is not valid because dictionaries in Python do not have a method called is_enabled.

The error is occurring in the file init.py in the plugins directory, specifically on the line where plugin_enabled = plugins_config.is_enabled(plugin_name) is called.

It seems like plugins_config is expected to be an object of a class that has an is_enabled method, but it is actually a dictionary.

To solve this issue, you need to understand what plugins_config is supposed to be and why it's a dictionary in this case. If plugins_config is supposed to be a dictionary and is_enabled is supposed to check if a plugin is enabled, you might need to change this line to something like:

plugin_enabled = plugins_config.get(plugin_name, False)

This will check if plugin_name is a key in the plugins_config dictionary and return its value if it is. If plugin_name is not a key in the dictionary, it will return False.

Please replace the line plugin_enabled = plugins_config.is_enabled(plugin_name) in the init.py file with the line provided above. The exact location of this file in your project structure would be /app/autogpt/plugins/init.py.

After making this change, you should be able to run your program without encountering this AttributeError. If you encounter any other issues, the error messages provided will be useful for debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant