IMAP Folder Size Information

Tim Williams (gmail) tdwdotnet at gmail.com
Mon Mar 20 10:35:23 CET 2006


On 20/03/06, Kevin F <neurogasm at gmail.com> wrote:
>
> I'm trying to use the following code to get my remote server's folder
> size information.  Unfortunately, i'm getting the error:
>
>
>
> Traceback (most recent call last):
>    File "/Life/School/Homework/Spring 2006/OPIM
> 399/Tutorial/IMAP/mailboxsize.py", line 23, in -toplevel-
>      number_of_messages_all += int(number_of_messages[0])
> ValueError: invalid literal for int(): The requested item could not be
> found.
>
> The error is on line 23,  so insert the following print statement at line
23

23    print "number_of_messages =", number_of_messages   #  For debugging
24    number_of_messages_all += int(number_of_messages[0])  # original line

and the reported error changes to:

number_of_messages =  ['Could not select box']
Traceback (most recent call last):
  File "C:\MXEXTRA\scripts\imapt1.py", line 24, in ?
    number_of_messages_all += int(number_of_messages[0])
ValueError: invalid literal for int(): Could not select box

HTH :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060320/a1674882/attachment.html>


More information about the Python-list mailing list