classification
Title: imaplib.IMAP4 "command illegal in this state" is unhelpful error message
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Make Imap Error more helpful
View: 1605192
Assigned To: Nosy List: Sjoerder, ezio.melotti, r.david.murray
Priority: low Keywords: easy

Created on 2009-07-06 08:22 by Sjoerder, last changed 2013-02-15 15:05 by r.david.murray. This issue is now closed.

Messages (4)
msg90166 - (view) Author: Sjoerd (Sjoerder) Date: 2009-07-06 08:22
If you do not IMAP4.select(), you get the following error:
imaplib.error: command SEARCH illegal in state AUTH.

This does not inform the user that he has to do IMAP4.select(). Better
would be: 
imaplib.error: command SEARCH illegal in state AUTH, allowed in state
SELECTED.

See also:
http://mail.python.org/pipermail/patches/2006-December/021308.html
msg90218 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2009-07-07 09:04
Can you provide a patch?
msg90256 - (view) Author: Sjoerd (Sjoerder) Date: 2009-07-08 07:45
See http://bugs.python.org/issue1605192
msg182146 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-02-15 15:05
The issue 1605192 fix was applied to 2.7.
History
Date User Action Args
2013-02-15 15:05:43r.david.murraysetstatus: open -> closed

superseder: Make Imap Error more helpful

nosy: + r.david.murray
messages: + msg182146
resolution: duplicate
stage: needs patch -> resolved
2009-07-08 07:45:18Sjoerdersetmessages: + msg90256
2009-07-07 09:04:56ezio.melottisetpriority: low

versions: + Python 2.7, - Python 2.5
keywords: + easy
nosy: + ezio.melotti

messages: + msg90218
stage: needs patch
2009-07-06 08:22:58Sjoerdercreate