Auto-GPT-Plugins icon indicating copy to clipboard operation
Auto-GPT-Plugins copied to clipboard

Plugins getting TypeError after update to AutoGPT 0.3.1

Open Monty1122 opened this issue 1 year ago • 6 comments

was working with 0.2.2 - updated to 0.3.1 and now getting errors in loading all plugins - did the plugin reinstall - but same issue - any body seeing this - sample from running AutoGPTEmailPlugin - but seems to be the same for all for me

Traceback (most recent call last): File "/Users/david/opt/anaconda3/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/Users/david/opt/anaconda3/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/Users/david/Desktop/dkautogpt/Auto-GPT-latest/autogpt/main.py", line 5, in autogpt.cli.main() File "/Users/david/opt/anaconda3/lib/python3.10/site-packages/click/core.py", line 1130, in call return self.main(*args, **kwargs) File "/Users/david/opt/anaconda3/lib/python3.10/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/Users/david/opt/anaconda3/lib/python3.10/site-packages/click/core.py", line 1635, in invoke rv = super().invoke(ctx) File "/Users/david/opt/anaconda3/lib/python3.10/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/Users/david/opt/anaconda3/lib/python3.10/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/Users/david/opt/anaconda3/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "/Users/david/Desktop/dkautogpt/Auto-GPT-latest/autogpt/cli.py", line 96, in main run_auto_gpt( File "/Users/david/Desktop/dkautogpt/Auto-GPT-latest/autogpt/main.py", line 127, in run_auto_gpt cfg.set_plugins(scan_plugins(cfg, cfg.debug_mode)) File "/Users/david/Desktop/dkautogpt/Auto-GPT-latest/autogpt/plugins.py", line 238, in scan_plugins loaded_plugins.append(a_module()) File "/Users/david/opt/anaconda3/lib/python3.10/site-packages/abstract_singleton/init.py", line 14, in call cls._instances[cls] = super().call(*args, **kwargs) TypeError: Can't instantiate abstract class AutoGPTEmailPlugin with abstract methods can_handle_report, can_handle_text_embedding, can_handle_user_input, handle_text_embedding, report, user_input

same for AutoGPTApiTools File "/Users/david/opt/anaconda3/lib/python3.10/site-packages/abstract_singleton/init.py", line 14, in call cls._instances[cls] = super().call(*args, **kwargs) TypeError: Can't instantiate abstract class AutoGPTApiTools with abstract methods can_handle_report, can_handle_text_embedding, can_handle_user_input, handle_text_embedding, report, user_input

Monty1122 avatar May 28 '23 12:05 Monty1122

Have you tried:

pip install -r requirement.txt

python -m install-plugin-deps

Lrennard avatar May 29 '23 08:05 Lrennard

It was working fine for me but after the update, I'm getting the same error "...TypeError: Can't instantiate abstract class AutoGPTApiTools with abstract methods can_handle_report, can_handle_text_embedding, can_handle_user_input, handle_text_embedding, report, user_input." I reinstalled the plugins but no go. Any ideas?

dynamikapps avatar May 29 '23 15:05 dynamikapps

"I reinstalled the plugins but no go." Did you pull latest plugin folder from repo?

"Can't instantiate abstract class AutoGPTApiTools" Definitely a python issue, it's hard to tell without knowing more about your configuration but my general recommendation would be

Make sure you have the latest version of the Plugin repo Make sure you are running the AGPT stable branch after downloading plugin folder install dependencies <--install-plugin-deps>

Lrennard avatar May 29 '23 20:05 Lrennard

getting the same error.

I executed ./run.sh --install-plugin-deps and everything is fine

"TypeError: Can't instantiate abstract class AutoGPTApiTools with abstract methods can_handle_report, can_handle_text_embedding, can_handle_user_input, handle_text_embedding, report, user_input"

suibber avatar May 30 '23 02:05 suibber

Might be related to this being merged into master? https://github.com/Significant-Gravitas/Auto-GPT/pull/4402/files

Siivers avatar May 30 '23 20:05 Siivers

@Siivers I updated to the latest master - now on ##4482 - but I still get this

File "/Users/david/opt/anaconda3/lib/python3.10/site-packages/abstract_singleton/init.py", line 14, in call cls._instances[cls] = super().call(*args, **kwargs) TypeError: Can't instantiate abstract class AutoGPTEmailPlugin with abstract methods can_handle_report, can_handle_text_embedding, can_handle_user_input, handle_text_embedding, report, user_input

I also reinstalled the plugins code

Monty1122 avatar May 30 '23 20:05 Monty1122

I have the same issue, fresh install according to the manual

File "C:\Users\sd\AppData\Local\Programs\Python\Python311\Lib\site-packages\abstract_singleton_init_.py", line 14, in call cls._instances[cls] = super().call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: Can't instantiate abstract class AutoGPTApiTools with abstract methods can_handle_report, can_handle_text_embedding, can_handle_user_input, handle_text_embedding, report, user_input

stefan-durina avatar Jun 01 '23 17:06 stefan-durina

Still The Issue persists in The Latest Stable release. I tried today

derudra avatar Jun 07 '23 13:06 derudra

Did you use the latest versions of the plugins?

ntindle avatar Jun 07 '23 13:06 ntindle

Yes i Did. It was a fresh install of the latest stable release of AutoGPT and installed the official plugins latest also.

derudra avatar Jun 07 '23 15:06 derudra

Yup same here! Tried reinstalling everything from a scratch but problem still persists.

EDIT: 1st party plugins work just fine but 3rd party ones don't.

EDIT2: Found out that the 3rd party plugin I tried to use didn't have some defs set in the init python file. Set those and everything works and loads ok.

def can_handle_text_embedding(
    self, text: str
) -> bool:
    return False

def handle_text_embedding(
    self, text: str
) -> list:
    pass

def can_handle_user_input(self, user_input: str) -> bool:
    return False

def user_input(self, user_input: str) -> str:
    return user_input

def can_handle_report(self) -> bool:
    return False

def report(self, message: str) -> None:
    pass

Stui avatar Jun 09 '23 09:06 Stui