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

BAD ['[CLIENTBUG] Too many arguments for command'] #6

Open
halfd opened this issue Feb 11, 2013 · 6 comments
Open

BAD ['[CLIENTBUG] Too many arguments for command'] #6

halfd opened this issue Feb 11, 2013 · 6 comments

Comments

@halfd
Copy link
Collaborator

halfd commented Feb 11, 2013

Traceback:

Traceback (most recent call last):
  File "./harvest.py", line 32, in <module>
    response, num_mails = connection.select(mailbox, True)
  File "/usr/lib/python2.7/imaplib.py", line 649, in select
    typ, dat = self._simple_command(name, mailbox)
  File "/usr/lib/python2.7/imaplib.py", line 1070, in _simple_command
    return self._command_complete(name, self._command(name, *args))
  File "/usr/lib/python2.7/imaplib.py", line 905, in _command_complete
    raise self.error('%s command error: %s %s' % (name, typ, data))
imaplib.error: EXAMINE command error: BAD ['[CLIENTBUG] Too many arguments for command']

Will examine further straight away.

@halfd
Copy link
Collaborator Author

halfd commented Feb 11, 2013

Same problem with python 3.2

@halfd
Copy link
Collaborator Author

halfd commented Feb 11, 2013

Det bug seems to be that the test account has a number of folders/labels named:

    1. Current
    1. Reply
    1. DO

harvest.py / gmail chokes on these - manually trying to fetch another folder called "Links" works fine.

@halfd
Copy link
Collaborator Author

halfd commented Feb 11, 2013

Okay, we probably need some escaping of some kind here - while I'm sure there are some docs on this, I'm more content with guessing :)

When I select the above mentioned mailbox "2. DO" in gmail I see two strings in the UI :
One is in the URL /mail/u/0/?shva=1#label/2.+DO where the string has simply been URL encoded.
Another is in Gmails search box, where the string "label:2.-do" appears. Lower case and with the space turned into a dash.

Experiments will take place!

@halfd
Copy link
Collaborator Author

halfd commented Feb 11, 2013

Okay, I'll read the docs :(

IMAP:
https://tools.ietf.org/html/rfc3501#section-6.3.1

IMAP4r1 Mailbox Names vs. Unicode:
http://fetchmail.berlios.de/Mailbox-Names-UTF7.html

@filipefigcorreia
Copy link

Dealing with this issue myself, in a different context, and thought you could find this comment useful.

@jchillerup
Copy link
Owner

Thanks for sharing, Filipe!

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

No branches or pull requests

3 participants