zero length field name in format

Allan Wind allan_wind at lifeintegrity.com
Tue Apr 17 05:15:44 UTC 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/accounts.py", line 446, in syncfolder
>     localfolder.syncmessagesto(remotefolder, statusfolder)
>   File "/home/allan/src/offlineimap/offlineimap/folder/Base.py", line 526, in syncmessagesto
>     action(dstfolder, statusfolder)
>   File "/home/allan/src/offlineimap/offlineimap/folder/Base.py", line 426, in syncmessagesto_delete
>     self.ui.deletingmessages(deletelist, [dstfolder])
>   File "/home/allan/src/offlineimap/offlineimap/ui/UIBase.py", 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:

-        self.logger.info("Deleting %d messages (%s) in %s" % (
-                len(uidlist),
+        prefix = "[DRYRUN] " if self.dryrun else ""
+        self.info("{}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
-- 
Allan Wind
Life Integrity, LLC
<http://lifeintegrity.com>
-------------- 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: <http://lists.alioth.debian.org/pipermail/offlineimap-project/attachments/20120417/b981880d/attachment.patch>


More information about the OfflineIMAP-project mailing list