On 9/26/2012 8:27 AM, Con Wieland wrote:
> Now it processes some but I now get:
> 
> ./prune_arch -l mgsa-l -d 1095 -bpnv
> Processing mgsa-l mailbox
> Traceback (most recent call last):
>   File "./prune_arch", line 191, in ?
>     main()
>   File "./prune_arch", line 156, in main
>     mdate = msg['date'] and mktime_tz(parsedate_tz(msg['date']))
> TypeError: string indices must be integers


I don't know what the issue could be. The code is doing


    for msg in mbox:
        msgs += 1
        mdate = msg['date'] and mktime_tz(parsedate_tz(msg['date']))

And the above error seems to be saying that msg is not a mailbox.Message
object, but I don't know what that could be. I have made a change in the
script changing line 144 from

            mbox = Mailbox.Mailbox(mboxf)

to

            mbox = Mailbox.mbox(mboxf)

The former was not strictly correct, but worked in my tests. The online
scripts have been updated.

If this doesn't fix it, I think I'll need access to the actual mailbox
to debug this.


> My "date' command gives this format Wed Sep 26 08:21:50 PDT 2012


That's not relevant to this problem.

-- 
Mark Sapiro <[email protected]>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

------------------------------------------------------
Mailman-Users mailing list [email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to