I used the same trick for lazyT (object returned by T). In trunk.
On Aug 22, 12:58 am, Jonathan Lundell <[email protected]> wrote: > On Aug 21, 2010, at 10:41 PM, mdipierro wrote: > > > I had it, together with __getslice__, I thought I pushed in 819 but > > perhaps I did not. Pushing again. > > That's better. > > > > > On Aug 22, 12:17 am, Jonathan Lundell <[email protected]> wrote: > >> On Aug 21, 2010, at 10:02 PM, mdipierro wrote: > > >>> Did you try 819? > > >> I think XML needs this: > > >> def __getitem__(self, key): > >> return str(self).__getitem__(key) > > >>> Massimo > > >>> On Aug 21, 11:01 pm, "mr.freeze" <[email protected]> wrote: > >>>> I get the same thing on a newly created app when running from trunk: > > >>>> Traceback (most recent call last): > >>>> File "C:\web2py\gluon\restricted.py", line 188, in restricted > >>>> exec ccode in environment > >>>> File "C:\web2py\applications\crashtest/views\default/index.html", > >>>> line 27, in <module> > >>>> TypeError: 'XML' object is unsubscriptable > > >>>> On Aug 21, 9:58 pm, mdipierro <[email protected]> wrote: > > >>>>> Which version. If not web2py stable, please check latest trunk. > > >>>>> On Aug 21, 8:33 pm, Jose <[email protected]> wrote: > > >>>>>> Hi, > > >>>>>> (I can not find the thread where it was this error) > > >>>>>> From admin create a new application: apptest > > >>>>>> go to:http://127.0.0.1:8000/apptest > > >>>>>> produces the following error: > > >>>>>> TypeError: 'XML' object is unsubscriptable > > >>>>>> if type(code) == types.CodeType: > >>>>>> ccode = code > >>>>>> else: > >>>>>> ccode = compile2(code,layer) > > >>>>>> exec ccode in environment > > >>>>>> except HTTP: > >>>>>> raise > >>>>>> except Exception: > >>>>>> # XXX Show exception in Wing IDE if running in debugger

