I also have been having the same issue. I'm running web2py 2.0.9
I only have one db = DAL statement.
All of my DAL is in models/db.py. I don't have any files in the modules
directory.
I haven't specifically stored a rows object in session, although the
controller does have a couple of the following statements.
if form.accepts(request.vars,session, dbio=False):
On Monday, October 1, 2012 3:05:34 PM UTC-6, Massimo Di Pierro wrote:
>
> Are you storing a rows object in a session? Do you have DAL in modules
> instead of models? Do you have multiple db=DAL() statements?
>
> On Monday, 1 October 2012 14:33:29 UTC-5, Wes Hall wrote:
>>
>> I have been having the same issue and was able to try trunk just now.
>>
>> The error persists.
>>
>> My working powerTable code on 1.99.3 no longer works on 2.0.9.
>>
>> On Monday, October 1, 2012 1:23:54 PM UTC-4, Massimo Di Pierro wrote:
>>>
>>> Can you please try the trunk version?
>>>
>>> On Sunday, 30 September 2012 21:32:22 UTC-5, visuallinux wrote:
>>>>
>>>> Dear Massimo.
>>>>
>>>> My code is the following:
>>>>
>>>> @auth.requires_membership('Administrador')
>>>> def clientes():
>>>>
>>>>
>>>> class Virtual(object):
>>>>
>>>> @virtualsettings(label=T('Editar'))
>>>> def edit(self):
>>>>
>>>> link_editar= URL(r =request,f='editablefunction',
>>>> args=[self.clientes.id])
>>>> link_icono_editar= IMG(_src=URL(r=request,c='static',
>>>> f='images/Edit_Icon.png'),
>>>> _alt='Editar'
>>>> )
>>>> return (A(link_icono_editar,_href= link_editar))# + str(
>>>> self.clientes.id)))
>>>>
>>>> reg=db(db.clientes).select(db.clientes.id
>>>> ,db.clientes.rut,db.clientes.dv,db.clientes.rsocial,
>>>>
>>>> db.clientes.direccion,db.clientes.ciudad,db.clientes.mail,
>>>>
>>>> db.clientes.tipo,db.clientes.fecha,db.clientes.giro,db.tarifa.nombre,
>>>> db.estados.nombre,db.clientes.tarifica,
>>>> join=(db.tarifa.on(db.clientes.id_tarifa==db.tarifa.id),
>>>> db.estados.on(db.clientes.estado==db.estados.id),
>>>> db.tipos.on(db.clientes.tipo==db.tipos.id),
>>>> db.tarificacion.on(db.clientes.tarifica==
>>>> db.tarificacion.id)),
>>>>
>>>> orderby=db.clientes.rsocial)
>>>>
>>>> powerTable = plugins.powerTable
>>>> powerTable.datasource = reg
>>>> .............
>>>> .............
>>>> table=powerTable.create()
>>>> return dict(table=table)
>>>>
>>>>
>>>> I do not understand what is wrong.
>>>>
>>>> --- On *Sun, 9/30/12, Massimo Di Pierro <[email protected]>* wrote:
>>>>
>>>>
>>>> From: Massimo Di Pierro <[email protected]>
>>>> Subject: [web2py] Re: powerTable AttributeError: 'DAL' object has no
>>>> attribute 'virtual'
>>>> To: [email protected]
>>>> Date: Sunday, September 30, 2012, 11:00 PM
>>>>
>>>> I think it should be Virtual, not virtual.
>>>>
>>>> On Sunday, 30 September 2012 20:11:34 UTC-5, visuallinux wrote:
>>>>
>>>> Dear All.
>>>>
>>>> I am trying to use PowerTable, but i am receiving the follow error:
>>>>
>>>> Traceback (most recent call last):
>>>> File "/home/fvillarroel/www/web2py/ gluon/restricted.py", line 209,
>>>> in restricted
>>>> exec ccode in environment
>>>> File "/home/fvillarroel/www/web2py/ applications/administrador/
>>>> controllers/clientes.py", line 107, in <module>
>>>> File "/home/fvillarroel/www/web2py/ gluon/globals.py", line 185, in
>>>> <lambda>
>>>> self._caller = lambda f: f()
>>>> File "/home/fvillarroel/www/web2py/ gluon/tools.py", line 2783, in f
>>>> return action(*a, **b)
>>>> File "/home/fvillarroel/www/web2py/ applications/administrador/
>>>> controllers/clientes.py", line 63, in clientes
>>>> table=powerTable.create()
>>>> File "/home/fvillarroel/www/web2py/ applications/administrador/
>>>> models/plugin_powertable.py", line 704, in plugin_powertable
>>>> PowerTable(),
>>>> File "/home/fvillarroel/www/web2py/ applications/administrador/
>>>> models/plugin_powertable.py", line 178, in __init__
>>>> headers[c] = sqlrows.db[t][f].label
>>>> File "/home/fvillarroel/www/web2py/ gluon/dal.py", line 7136, in
>>>> __getitem__
>>>> return self.__getattr__(str(key))
>>>> File "/home/fvillarroel/www/web2py/ gluon/dal.py", line 7143, in
>>>> __getattr__
>>>> return ogetattr(self, key)
>>>> AttributeError: 'DAL' object has no attribute 'virtual'
>>>>
>>>>
>>>> Any idea.
>>>>
>>>>
>>>> --
>>>>
>>>>
>>>>
>>>>
>>>>
--