riensen / Auto-GPT-Email-Plugin

Revolutionize email management with the Auto-GPT Email Plugin, leveraging AI to automate drafting, intelligent replies, and seamless inbox control.
MIT License
137 stars 15 forks source link

Issue w/ read_emails() #12

Closed BotezanTechnologic closed 1 year ago

BotezanTechnologic commented 1 year ago

SYSTEM: Command read_emails returned: Error: decode() argument 'encoding' must be str, not None

Auto-GPT is throwing this error when it attempts to read_emails() and fetch any of my recent mails for processing or replies.

I believe the Imap/smtp is configured properly as I was able to send an email out with auto-gpt, but I could be wrong.

Also attempted some work-arounds in the python code, but was unsuccessful after a few different attempts.

Using 2FA w/ app password setup.

riensen commented 1 year ago

Thanks for the bug report. Can you let me know, what parameters Auto-GPT is using when calling the read_email command? A screenshot also works.

riensen commented 1 year ago

@BotezanTechnologic in addition I extended the imap search parameter such that more complex imap searches can be handled. This might resolve the issue.

runquik commented 1 year ago

Also testing this. Send email works pretty well but I'm also getting the permissions errors when trying to read emails. Also getting a permission error when trying to attach a file: image

runquik commented 1 year ago

Oh, here are a couple of shots from the read_emails command: image

image

BotezanTechnologic commented 1 year ago

Thanks for looking into this @riensen ! Appreciate you already pushing a possible fix, my bad on not replying till now.

When testing this I was just using the same test setup as in the docs.

Will test with the updated imap params later today and let you know what happens. If it throws another error, I will provide screenshots.

BotezanTechnologic commented 1 year ago

Confirmed fixed & working on my end ✅

Thank you @riensen !

riensen commented 1 year ago

Oh, here are a couple of shots from the read_emails command:

image

image

Auto-GPT seems to try to pass additional parameters to the read emails function. There is nothing that can be done to fix this within the plug-in. Its a problem within Auto-GPT (GPT not following directions).

riensen commented 1 year ago

@BotezanTechnologic Thanks for confirming!

runquik commented 1 year ago

@BotezanTechnologic can you tell me what you did to fix? I'm using the latest imap config and still having the same error

BotezanTechnologic commented 1 year ago

@runquik just updated with the new changes that got pushed. I don't think you and I were experiencing the same error.