Skip to content

Dev#1

Open
pocketOfShells wants to merge 3 commits intoadsnash:masterfrom
pocketOfShells:dev
Open

Dev#1
pocketOfShells wants to merge 3 commits intoadsnash:masterfrom
pocketOfShells:dev

Conversation

@pocketOfShells
Copy link

No description provided.

@DFC1990
Copy link

DFC1990 commented Oct 10, 2020

Works Great, but there is only On my way! Error left:

After the Program fetches the Mails and searches for Links

Line97, in getEmails
If sender[0][1] in spammers:
IndexError: list index out of Range

@0cwa
Copy link

0cwa commented Mar 11, 2022

I get this error on this PR with Yahoo mail:

Log in successful

Getting emails with unsubscribe in the body

Getting links and addresses

Traceback (most recent call last):
  File "/home/user/Desktop/AutoUnsubscriber/AutoUnsubscriber.py", line 300, in <module>
    main()
  File "/home/user/Desktop/AutoUnsubscriber/AutoUnsubscriber.py", line 297, in main
    Auto.usageLoop()
  File "/home/user/Desktop/AutoUnsubscriber/AutoUnsubscriber.py", line 289, in usageLoop
    self.fullProcess()
  File "/home/user/Desktop/AutoUnsubscriber/AutoUnsubscriber.py", line 279, in fullProcess
    self.getEmails()
  File "/home/user/Desktop/AutoUnsubscriber/AutoUnsubscriber.py", line 93, in getEmails
    msg = pyzmail.PyzMessage.factory(raw[UID][b'BODY[]'])
KeyError: b'BODY[]'

Gmail works but throws this error when trying to delete:

Logging into email server to delete emails

Log in successful

Searching for emails to delete from sc-noreply@google.com
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.10/site-packages/imapclient/imapclient.py", line 1124, in _search
    data = self._raw_command_untagged(b"SEARCH", args)
  File "/home/user/.local/lib/python3.10/site-packages/imapclient/imapclient.py", line 1608, in _raw_command_untagged
    typ, data = self._raw_command(command, args, uid=uid)
  File "/home/user/.local/lib/python3.10/site-packages/imapclient/imapclient.py", line 1670, in _raw_command
    return self._imap._command_complete(to_unicode(command), tag)
  File "/usr/lib64/python3.10/imaplib.py", line 1055, in _command_complete
    raise self.error('%s command error: %s %s' % (name, typ, data))
imaplib.IMAP4.error: SEARCH command error: BAD [b'Could not parse command']

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/Desktop/AutoUnsubscriber/AutoUnsubscriber.py", line 300, in <module>
    main()
  File "/home/user/Desktop/AutoUnsubscriber/AutoUnsubscriber.py", line 297, in main
    Auto.usageLoop()
  File "/home/user/Desktop/AutoUnsubscriber/AutoUnsubscriber.py", line 289, in usageLoop
    self.fullProcess()
  File "/home/user/Desktop/AutoUnsubscriber/AutoUnsubscriber.py", line 283, in fullProcess
    self.deleteEmails()
  File "/home/user/Desktop/AutoUnsubscriber/AutoUnsubscriber.py", line 223, in deleteEmails
    DelUIDs = self.imap.search(['TEXT','unsubscribe', fromSender])
  File "/home/user/.local/lib/python3.10/site-packages/imapclient/imapclient.py", line 1098, in search
    return self._search(criteria, charset)
  File "/home/user/.local/lib/python3.10/site-packages/imapclient/imapclient.py", line 1129, in _search
    raise exceptions.InvalidCriteriaError(
imapclient.exceptions.InvalidCriteriaError: b'Could not parse command'

This error may have been caused by a syntax error in the criteria: ['TEXT', 'unsubscribe', 'FROM sc-noreply@google.com']
Please refer to the documentation for more information about search criteria syntax..
https://imapclient.readthedocs.io/en/master/#imapclient.IMAPClient.search

@0cwa
Copy link

0cwa commented Mar 16, 2022

Works Great, but there is only On my way! Error left:

After the Program fetches the Mails and searches for Links

Line97, in getEmails If sender[0][1] in spammers: IndexError: list index out of Range

I never got this error.

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

Successfully merging this pull request may close these issues.

3 participants