The problem is in line 278 of default.py in the edit() method
response.flash=T("file saved on % (time)s",dict(time=time.ctime()))
remove the space between % and (time) and it all works fine
On Dec 6, 9:28 pm, billf <[EMAIL PROTECTED]> wrote:
> The problem occurs because the format string passed to lazyT.__str__
> has a space between the first % and the (.
>
> If you run
>
> python -c "print '% (time)s' % dict(time='test')"
>
> you get the same unsupported format error. I haven't yet identified
> where the space comes from.
>
> On Dec 6, 8:43 pm, billf <[EMAIL PROTECTED]> wrote:
>
> > yup
>
> > On Dec 6, 4:11 pm, mdipierro <[EMAIL PROTECTED]> wrote:
>
> > > Bill,
>
> > > is this the compiled version or source? Which version of python
>
> > > Can you run this for me?
>
> > > python -c "print '%(time)s' % dict(time='test')"
>
> > > does it print test?
>
> > > Massimo
>
> > > On Dec 6, 6:20 am, billf <[EMAIL PROTECTED]> wrote:
>
> > > > I have installed web2py (Version 1.52 (2008-12-02 16:14:02)).
>
> > > > Now when I edit any code (whether changes made or not) and save I get
> > > > a ticket thrown by edit.html
>
> > > > Traceback (most recent call last):
> > > > File "E:\DevTools\web2py\gluon\restricted.py", line 62, in
> > > > restricted
> > > > exec ccode in environment
> > > > File "E:\DevTools\web2py\applications\admin/views/default/
> > > > edit.html", line 45, in <module>
> > > > File "E:\DevTools\web2py\gluon\globals.py", line 59, in write
> > > > else: self.body.write(xmlescape(data))
> > > > File "E:\DevTools\web2py\gluon\html.py", line 17, in xmlescape
> > > > return data.xml()
> > > > File "E:\DevTools\web2py\gluon\languages.py", line 38, in xml
> > > > return cgi.escape(str(self))
> > > > File "E:\DevTools\web2py\gluon\languages.py", line 35, in __str__
> > > > if self.s: return m % self.s
> > > > ValueError: unsupported format character '(' (0x28) at index 16
>
> > > > This is the same whether I am saving my code or web2py code, e.g.
> > > > welcome. Any ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---