argument must be 9-item sequence, not None

Bug #759801 reported by Brian Snipes
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Backup Gmail
Fix Committed
High
Joseph Wen

Bug Description

Initial backup gets to 50% and then errors out and program must be killed:

Traceback (most recent call last):
  File "./gui.py", line 358, in run
    self.func(self.options, self.prog, True)
  File "/home/username/Apps/backup-gmail/backup_gmail.py", line 526, in doBackup
    backup.backupTo([options.start_date, options.end_date], overwrite, include_labels, exclude_labels)
  File "/home/username/Apps/backup-gmail/backup_gmail.py", line 351, in backupTo
    self.doBackup(date_range, include_labels, exclude_labels)
  File "/home/username/Apps/backup-gmail/backup_gmail.py", line 338, in doBackup
    self.fetchAllMail(date_range)
  File "/home/username/Apps/backup-gmail/backup_gmail.py", line 310, in fetchAllMail
    self.fetchAllLabel(date_range, exclude_labels)
  File "/home/username/Apps/backup-gmail/backup_gmail.py", line 299, in fetchAllLabel
    self.fetchMailByLabel(l, date_range)
  File "/home/username/Apps/backup-gmail/backup_gmail.py", line 222, in fetchMailByLabel
    self.fetchMail(uid, seen, label, size)
  File "/home/username/Apps/backup-gmail/backup_gmail.py", line 278, in fetchMail
    self.flushFetchMailRequest()
  File "/home/username/Apps/backup-gmail/backup_gmail.py", line 269, in flushFetchMailRequest
    self.processMail(rfc[1], *self.fetchBuffer[i])
  File "/home/username/Apps/backup-gmail/backup_gmail.py", line 237, in processMail
    fold = time.strftime("%Y-%m", date)
TypeError: argument must be 9-item sequence, not None

Revision history for this message
Jay Gindin (jayg) wrote :

I'm also getting this. The first time I saw it, I re-ran the backup with the same parameters and it then worked. The second time I ran into it, it didn't work the second time.

I have:
  From: 01-Jan-2009
  To: 31-Dec-2009
  Keep read/unread

no labels were specified, and I did *not* choose an incremental backup.

Revision history for this message
Tomáš Pikálek (tpikalek) wrote :

Also getting this. I run backup_gmail in console without any parameters, just entered folder, e-mail and password.

Joseph Wen (wenjoseph)
Changed in backup-gmail:
status: New → Fix Committed
assignee: nobody → Joseph Wen (wenjoseph)
importance: Undecided → High
Revision history for this message
Michael Schievelbein (hu6-michael-t16) wrote :

I am also receiving the same error.
I found out by using the Include option and playing around that there appears to be a limit of 9 labels on the account.
If you Include the labels <9 at a time, it works.

Revision history for this message
C Fraire (cfraire) wrote :

Michael, there is no limit on the number of labels. The error is due to a message in your account that has no "Date:" which for you is being excluded when you run with a smaller set of labels.

wenjoseph fixed this in trunk revision 6. The Downloads for this project do not reflect the latest trunk code. You can get trunk revision 6 versions of backup_gmail.py and gui.py by browsing the code.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.