6.5.4 zero length field name in format

Tomasz Żok tomasz.zok at gmail.com
Sat Jun 2 20:27:34 BST 2012


Hi Luis,

I searched for this in my installation (6.5.3.1) and I can see the following
entries:

folder/Base.py:     self.ui.info("[DRYRUN] Copy {} messages from {}[{}] to {}".format(
ui/UIBase.py:       self.info("{}Creating folder {}[{}]".format(
ui/UIBase.py:       self.info("{}Deleting {} messages ({}) in {}".format(
ui/UIBase.py:       self.info("[DRYRUN] {}".format(msg))


I assume similar lines are present in 6.5.4... And this syntax is not supported
by Python 2.6.6.

To fix your error, you should do one of these:
- upgrade to Python 2.7
- modify these files on your own: number the curly braces

If you decide on the second option, note that you should look for any
occurrence of {}, but inside of string (i.e. embedded in quotes "..." or
apostrophes '...'), like the ones listed aboce. A simple grep will give you
also lines like this:

    retval = {}

But these are fine and should not be changes. Here the braces {} are not inside
of string. 

Cheers,
Tomek


> Hi Tomaz,
> 
> You got me lost in this one!
> 
> Where should I look for these '{}/{}'?
> In /usr/lib64/python2.6/site-packages/offlineimap/
> or
> elsewhere?
> 
> I did a grep there and could find some '{}', but none that resembles {}/{}.
> 
> 
> Luis
> 
> 
> 
> 2012/6/2 Tomasz Żok <tomasz.zok at gmail.com>:
> > Hi Luis,
> >
> > if you get this error, probably you have entries like this in your format
> > string: {}
> >
> > In your Python version, it is required that these curly braces are numbered
> > (starting from zero). So for example:
> > - INCORRECT:    '{}/{}'
> > - CORRECT:      '{0}/{1}'
> >
> > Hope this helps, cheers,
> > Tomek
> >
> >
> > On 06/02/12 at 06:55pm, Luis P. Mendes wrote:
> >> Hi all,
> >>
> >> I've already read about this in the archive, but didn't understand
> >> whether there is a patch, where is it or if it is already contemplated
> >> in 6.5.4.
> >>
> >> Here's the output:
> >>
> >> *** Processing account luislupe
> >> Establishing connection to imap.gmail.com:993
> >> ERROR: While attempting to sync account 'luislupe'
> >>   zero length field name in format
> >> *** Finished account 'luislupe' in 0:01
> >> ERROR: Exceptions occurred during the run!
> >> ERROR: While attempting to sync account 'luislupe'
> >>   zero length field name in format
> >>
> >> $ python -V
> >> Python 2.6.6
> >>
> >> $ offlineimap --version
> >> 6.5.4
> >>
> >>
> >> What do I need to do to solve this issue?
> >>
> >>
> >> TIA,
> >>
> >>
> >> Luis
> >>
> >> _______________________________________________
> >> OfflineIMAP-project mailing list
> >> OfflineIMAP-project at lists.alioth.debian.org
> >> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project
> >>
> >> OfflineIMAP homepage: http://software.complete.org/offlineimap




More information about the OfflineIMAP-project mailing list