zero length field name in format

Allan Wind allan_wind at
Tue Apr 17 06:15:44 BST 2012

On 2012-04-10 21:07:20, Allan Wind wrote:
> I am seeing these errors with current:
>   zero length field name in format
> ERROR: Syncing folder INBOX [acc: lifeintegrity]
>   zero length field name in format
> ERROR: ERROR in syncfolder for lifeintegrity folder INBOX: Traceback (most recent call last):
>   File "/home/allan/src/offlineimap/offlineimap/", line 446, in syncfolder
>     localfolder.syncmessagesto(remotefolder, statusfolder)
>   File "/home/allan/src/offlineimap/offlineimap/folder/", line 526, in syncmessagesto
>     action(dstfolder, statusfolder)
>   File "/home/allan/src/offlineimap/offlineimap/folder/", line 426, in syncmessagesto_delete
>     self.ui.deletingmessages(deletelist, [dstfolder])
>   File "/home/allan/src/offlineimap/offlineimap/ui/", line 351, in deletingmessages
>     offlineimap.imaputil.uid_sequence(uidlist), ds))
> ValueError: zero length field name in format
> What does it mean, and how would I go about fixing it?

It looks like the regression was in 256a26a.  The formatting 
syntax requires a name or number in Python 2.6.6:

-"Deleting %d messages (%s) in %s" % (
-                len(uidlist),
+        prefix = "[DRYRUN] " if self.dryrun else ""
+"{}Deleting {} messages ({}) in {}".format(
+                prefix, len(uidlist),

I was able to trigger the error by deleting some messages, then
press Ctrl-C.  There is a handful other instances.  Attached 
patch which should be fairly straight forward.

Allan Wind
Life Integrity, LLC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Python-2.6-required-numbered-or-named-format-strings.patch
Type: text/x-diff
Size: 5271 bytes
Desc: not available
URL: <>

More information about the OfflineIMAP-project mailing list