Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-11-24 Thread palomar
so, with web2py 2.2.1 and powertable:

db.acquisti.id_p.represent=lambda id: db.prodotti[id].nomeb 
 #SQLFORM.grid: doesn't work;  powertable: works
db.acquisti.id_p.represent=lambda id, row: db.prodotti[id].nomeb   
#SQLFORM.grid: work;  powertable: doesn't work

Massimo, aiutaci tu! ;)

Il giorno sabato 24 novembre 2012 02:40:26 UTC+1, tomt ha scritto:
>
> I run into the same problem.  I don't have a solution other than removing 
> the row from the represent statement when using powertable.  
> example:
> db.acquisti.id_p.represent=lambda id: db.prodotti[id].nomeb
> or
> db.task.designer.represent = lambda value: db.staff[value].name
>
> The problem with this is that it will then generate an error if 
> SQLFORM.grid is used to display the same table.
>
>
> On Friday, November 23, 2012 1:50:27 PM UTC-6, palomar wrote:
>>
>> Thanks for your tips but I have one more problem:
>> in my model I use represent to view the title instead of the ID of a 
>> linked table:
>>
>> #db.acquisti.id_p.represent=lambda id, row: db.prodotti[id].nomeb
>>
>> that (I think) generate this error whit powertable:
>> (() takes exactly 2 arguments (1 given))
>>
>> line 286:
>>
>> elif field.represent:
>> r = field.represent(r)
>>
>>
>> Someone can help me?
>> ciao ;)
>>
>> Il giorno venerdì 23 novembre 2012 20:44:02 UTC+1, palomar ha scritto:
>>>
>>> i think 
>>>
>>> response.files.append(URL(r=request,c='static',f='plugin_powertable/ui/css/%s/jquery-ui-1.8.24.custom.js'))
>>> ;)
>>>
>>> Il giorno giovedì 18 ottobre 2012 06:06:33 UTC+2, tomt ha scritto:

 After a little digging around on the web  I found out why I was 
 powertable was generating errors with the latest web2py.

 jquery version 1.8 requires jquery-ui-1.8.22

 I went to http://jqueryui.com/ and downloaded legacy v1.8.24 which 
 provided jquery-ui-1.8.24.custom.zip. This zip file included 
 jquery-ui-1.8.24.custom.min.js which I then copied to 
 static/plugin_powertable/ui/js
 I modified models/powertable.py to load it:


 After taking these steps, the error messages are gone and now 
 powertable works with no problems.



 On Sunday, October 14, 2012 9:10:17 PM UTC-6, tomt wrote:
>
> I noticed another problem with powertable and web2py 2.0.9
>
> When I created a new app under web2py 2.0.9 and tried to implement a 
> powertable it exhibited some unusual behaviour. On initial callup, the 
> powertable showed all records instead of the number specified by 
> iDisplayLength and the columns don't show the column sorting icon. Also 
> the 
> column id is displayed even though table.showkeycolumn = False
>
> Firebug showed an error in plugin_powertable/jquery.dataTables.min.js: 
> "detailed error: TypeError: a.charCodeAt is not a function"
>
> I discovered that if I replaced /static/js/jquery.js with version 
> v1.7.1 from an earlier version of web2py, all the powertable problems 
> disappeared.
>
> Web2py 2.0.9 uses jQuery v@1.8.0 which apparently triggers the problem 
> with powertable.  Earlier versions of web2py used jQuery v1.7.1 which 
> seems 
> to work ok with powertable.
>
> I'm wondering if I can make powertable work if I use a more recent 
> version of datatables?  Which files from the datatables would I have to 
> incorporate? Any suggestions?
>
> - Tom
>
>
>
>
> On Monday, October 8, 2012 5:42:46 PM UTC-6, rochacbruno wrote:
>>
>> Thanks, I will update the repo. 
>
>

-- 





Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-11-23 Thread tomt
I run into the same problem.  I don't have a solution other than removing 
the row from the represent statement when using powertable.  
example:
db.acquisti.id_p.represent=lambda id: db.prodotti[id].nomeb
or
db.task.designer.represent = lambda value: db.staff[value].name

The problem with this is that it will then generate an error if 
SQLFORM.grid is used to display the same table.


On Friday, November 23, 2012 1:50:27 PM UTC-6, palomar wrote:
>
> Thanks for your tips but I have one more problem:
> in my model I use represent to view the title instead of the ID of a 
> linked table:
>
> #db.acquisti.id_p.represent=lambda id, row: db.prodotti[id].nomeb
>
> that (I think) generate this error whit powertable:
> (() takes exactly 2 arguments (1 given))
>
> line 286:
>
> elif field.represent:
> r = field.represent(r)
>
>
> Someone can help me?
> ciao ;)
>
> Il giorno venerdì 23 novembre 2012 20:44:02 UTC+1, palomar ha scritto:
>>
>> i think 
>>
>> response.files.append(URL(r=request,c='static',f='plugin_powertable/ui/css/%s/jquery-ui-1.8.24.custom.js'))
>> ;)
>>
>> Il giorno giovedì 18 ottobre 2012 06:06:33 UTC+2, tomt ha scritto:
>>>
>>> After a little digging around on the web  I found out why I was 
>>> powertable was generating errors with the latest web2py.
>>>
>>> jquery version 1.8 requires jquery-ui-1.8.22
>>>
>>> I went to http://jqueryui.com/ and downloaded legacy v1.8.24 which 
>>> provided jquery-ui-1.8.24.custom.zip. This zip file included 
>>> jquery-ui-1.8.24.custom.min.js which I then copied to 
>>> static/plugin_powertable/ui/js
>>> I modified models/powertable.py to load it:
>>>
>>>
>>> After taking these steps, the error messages are gone and now powertable 
>>> works with no problems.
>>>
>>>
>>>
>>> On Sunday, October 14, 2012 9:10:17 PM UTC-6, tomt wrote:

 I noticed another problem with powertable and web2py 2.0.9

 When I created a new app under web2py 2.0.9 and tried to implement a 
 powertable it exhibited some unusual behaviour. On initial callup, the 
 powertable showed all records instead of the number specified by 
 iDisplayLength and the columns don't show the column sorting icon. Also 
 the 
 column id is displayed even though table.showkeycolumn = False

 Firebug showed an error in plugin_powertable/jquery.dataTables.min.js: 
 "detailed error: TypeError: a.charCodeAt is not a function"

 I discovered that if I replaced /static/js/jquery.js with version 
 v1.7.1 from an earlier version of web2py, all the powertable problems 
 disappeared.

 Web2py 2.0.9 uses jQuery v@1.8.0 which apparently triggers the problem 
 with powertable.  Earlier versions of web2py used jQuery v1.7.1 which 
 seems 
 to work ok with powertable.

 I'm wondering if I can make powertable work if I use a more recent 
 version of datatables?  Which files from the datatables would I have to 
 incorporate? Any suggestions?

 - Tom




 On Monday, October 8, 2012 5:42:46 PM UTC-6, rochacbruno wrote:
>
> Thanks, I will update the repo. 



-- 





Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-11-23 Thread palomar
Thanks for your tips but I have one more problem:
in my model I use represent to view the title instead of the ID of a linked 
table:

#db.acquisti.id_p.represent=lambda id, row: db.prodotti[id].nomeb

that (I think) generate this error whit powertable:
(() takes exactly 2 arguments (1 given))

line 286:

elif field.represent:
r = field.represent(r)


Someone can help me?
ciao ;)

Il giorno venerdì 23 novembre 2012 20:44:02 UTC+1, palomar ha scritto:
>
> i think 
>
> response.files.append(URL(r=request,c='static',f='plugin_powertable/ui/css/%s/jquery-ui-1.8.24.custom.js'))
> ;)
>
> Il giorno giovedì 18 ottobre 2012 06:06:33 UTC+2, tomt ha scritto:
>>
>> After a little digging around on the web  I found out why I was 
>> powertable was generating errors with the latest web2py.
>>
>> jquery version 1.8 requires jquery-ui-1.8.22
>>
>> I went to http://jqueryui.com/ and downloaded legacy v1.8.24 which 
>> provided jquery-ui-1.8.24.custom.zip. This zip file included 
>> jquery-ui-1.8.24.custom.min.js which I then copied to 
>> static/plugin_powertable/ui/js
>> I modified models/powertable.py to load it:
>>
>>
>> After taking these steps, the error messages are gone and now powertable 
>> works with no problems.
>>
>>
>>
>> On Sunday, October 14, 2012 9:10:17 PM UTC-6, tomt wrote:
>>>
>>> I noticed another problem with powertable and web2py 2.0.9
>>>
>>> When I created a new app under web2py 2.0.9 and tried to implement a 
>>> powertable it exhibited some unusual behaviour. On initial callup, the 
>>> powertable showed all records instead of the number specified by 
>>> iDisplayLength and the columns don't show the column sorting icon. Also the 
>>> column id is displayed even though table.showkeycolumn = False
>>>
>>> Firebug showed an error in plugin_powertable/jquery.dataTables.min.js: 
>>> "detailed error: TypeError: a.charCodeAt is not a function"
>>>
>>> I discovered that if I replaced /static/js/jquery.js with version v1.7.1 
>>> from an earlier version of web2py, all the powertable problems disappeared.
>>>
>>> Web2py 2.0.9 uses jQuery v@1.8.0 which apparently triggers the problem 
>>> with powertable.  Earlier versions of web2py used jQuery v1.7.1 which seems 
>>> to work ok with powertable.
>>>
>>> I'm wondering if I can make powertable work if I use a more recent 
>>> version of datatables?  Which files from the datatables would I have to 
>>> incorporate? Any suggestions?
>>>
>>> - Tom
>>>
>>>
>>>
>>>
>>> On Monday, October 8, 2012 5:42:46 PM UTC-6, rochacbruno wrote:

 Thanks, I will update the repo. 
>>>
>>>

-- 





Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-11-23 Thread palomar
i think 
response.files.append(URL(r=request,c='static',f='plugin_powertable/ui/css/%s/jquery-ui-1.8.24.custom.js'))
;)

Il giorno giovedì 18 ottobre 2012 06:06:33 UTC+2, tomt ha scritto:
>
> After a little digging around on the web  I found out why I was powertable 
> was generating errors with the latest web2py.
>
> jquery version 1.8 requires jquery-ui-1.8.22
>
> I went to http://jqueryui.com/ and downloaded legacy v1.8.24 which 
> provided jquery-ui-1.8.24.custom.zip. This zip file included 
> jquery-ui-1.8.24.custom.min.js which I then copied to 
> static/plugin_powertable/ui/js
> I modified models/powertable.py to load it:
>
>
> After taking these steps, the error messages are gone and now powertable 
> works with no problems.
>
>
>
> On Sunday, October 14, 2012 9:10:17 PM UTC-6, tomt wrote:
>>
>> I noticed another problem with powertable and web2py 2.0.9
>>
>> When I created a new app under web2py 2.0.9 and tried to implement a 
>> powertable it exhibited some unusual behaviour. On initial callup, the 
>> powertable showed all records instead of the number specified by 
>> iDisplayLength and the columns don't show the column sorting icon. Also the 
>> column id is displayed even though table.showkeycolumn = False
>>
>> Firebug showed an error in plugin_powertable/jquery.dataTables.min.js: 
>> "detailed error: TypeError: a.charCodeAt is not a function"
>>
>> I discovered that if I replaced /static/js/jquery.js with version v1.7.1 
>> from an earlier version of web2py, all the powertable problems disappeared.
>>
>> Web2py 2.0.9 uses jQuery v@1.8.0 which apparently triggers the problem 
>> with powertable.  Earlier versions of web2py used jQuery v1.7.1 which seems 
>> to work ok with powertable.
>>
>> I'm wondering if I can make powertable work if I use a more recent 
>> version of datatables?  Which files from the datatables would I have to 
>> incorporate? Any suggestions?
>>
>> - Tom
>>
>>
>>
>>
>> On Monday, October 8, 2012 5:42:46 PM UTC-6, rochacbruno wrote:
>>>
>>> Thanks, I will update the repo. 
>>
>>

-- 





Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-17 Thread tomt
After a little digging around on the web  I found out why I was powertable 
was generating errors with the latest web2py.

jquery version 1.8 requires jquery-ui-1.8.22

I went to http://jqueryui.com/ and downloaded legacy v1.8.24 which provided 
jquery-ui-1.8.24.custom.zip. This zip file included 
jquery-ui-1.8.24.custom.min.js which I then copied to 
static/plugin_powertable/ui/js
I modified models/powertable.py to load it:
response.files.append(URL(r=request,c='static',f='plugin_powertable/ui/css/%s/jquery-ui-1.8.24.custom.css'
 
% theme))

After taking these steps, the error messages are gone and now powertable 
works with no problems.



On Sunday, October 14, 2012 9:10:17 PM UTC-6, tomt wrote:
>
> I noticed another problem with powertable and web2py 2.0.9
>
> When I created a new app under web2py 2.0.9 and tried to implement a 
> powertable it exhibited some unusual behaviour. On initial callup, the 
> powertable showed all records instead of the number specified by 
> iDisplayLength and the columns don't show the column sorting icon. Also the 
> column id is displayed even though table.showkeycolumn = False
>
> Firebug showed an error in plugin_powertable/jquery.dataTables.min.js: 
> "detailed error: TypeError: a.charCodeAt is not a function"
>
> I discovered that if I replaced /static/js/jquery.js with version v1.7.1 
> from an earlier version of web2py, all the powertable problems disappeared.
>
> Web2py 2.0.9 uses jQuery v@1.8.0 which apparently triggers the problem 
> with powertable.  Earlier versions of web2py used jQuery v1.7.1 which seems 
> to work ok with powertable.
>
> I'm wondering if I can make powertable work if I use a more recent version 
> of datatables?  Which files from the datatables would I have to 
> incorporate? Any suggestions?
>
> - Tom
>
>
>
>
> On Monday, October 8, 2012 5:42:46 PM UTC-6, rochacbruno wrote:
>>
>> Thanks, I will update the repo. 
>
>

-- 





[web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-17 Thread Jacinto Parga Fernández
Thanks so much!!

El lunes, 8 de octubre de 2012 22:15:58 UTC+2, Massimo Di Pierro escribió:
>
> :-)
>
> On Monday, 8 October 2012 12:53:27 UTC-5, Don_X wrote:
>>
>> BINGO ! - IT WORKS LIKE A CHARM MASSIMO !!! ...  
>>
>> Thank you ... now  I can study this properly so I can adapt it to my app !
>>
>> On Monday, October 8, 2012 1:49:09 PM UTC-4, Massimo Di Pierro wrote:
>>>
>>> Now the error is at a different line. The previous error has been fixed. 
>>> Now it is at line 215:
>>>
>>>
>>> try:
>>> _id = record[keycolumntbl][keycolumnfld]
>>> except KeyError:
>>>
>>>
>>> as before it should be
>>>
>>> try:
>>> _id = record[keycolumntbl][keycolumnfld]
>>> except (KeyError, AttributeError):
>>>
>>>
>>>
>>> On Monday, 8 October 2012 12:39:09 UTC-5, Don_X wrote:

 For a more detailed report .. I have openned up the last line 
 pertaining to the plugin_powertable.py below :



- 
Function argument list   

()

Code listing



20.
21.
22.
23.
24.
25.

26.
27.
28.
29.

table.showkeycolumn = False
table.extra = dict(
   
 details={'detailscallback':URL('myfunction.load')}
   )

table = table.create()


return locals()

   Variables
 
table>>>'...te': }>table.create<
function plugin_powertable>   
-   

*File /home/www-data/web2py/applications/powertable/
models/plugin_powertable.py in plugin_powertable at line 811*
code
arguments
variables   
Function argument list


()
  Code listing 

806.
807.
808.
809.
810.
811.

812.
813.
814.
815.

ifunctions=str(ifunctions),

 searchcolumnjs=str(searchcolumnjs)
)
  ),
CSS,
PowerTable(),

)


plugins.powerTable.create = plugin_powertable

Variables
global PowerTable
- 
 

*File /home/www-data/web2py/applications/powertable/
models/plugin_powertable.py in __init__ at line 215*
code
arguments
variables   

Function argument list


(self=<__restricted__.PowerTable object>)
  Code listing



210.
211.
212.
213.
214.
215.

216.
217.
218.
219.

else:
_title = T('Record %s' % str(rc+1))

#setting the id and key for every  based on required 
 keycolumn
try:
_id = record[keycolumntbl][keycolumnfld]

except KeyError:
if virtualfields:
_id = record[sqlrows.colnames[0].split('.')[0]].id
else:


   Variables
 
 record>>>object at 0xa757f98c>, 'name': 'Television'}>_idundefined
keycolumntbl'product'keycolumnfld'id'
- 

*File /home/www-data/web2py/gluon/dal.py in __getitem__ 
at line 6376*
code
arguments
variables  
Function argument list


(self=>>>'...ter object at 0xa757f98c>, 'name': 'Television'}>, 
key='product')
Code listing  

6371.
6372.
6373.
6374.
6375.
6376.

6377.
6378.
6379.
6380.

elif m:
try:
return ogetattr(self, m.group(1))[m.group(2)]
except (KeyError,AttributeError,TypeError):
key = m.group(2)
return ogetattr(self, key)


def __setitem__(self, key, value):
  

Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-14 Thread tomt
I noticed another problem with powertable and web2py 2.0.9

When I created a new app under web2py 2.0.9 and tried to implement a 
powertable it exhibited some unusual behaviour. On initial callup, the 
powertable showed all records instead of the number specified by 
iDisplayLength and the columns don't show the column sorting icon. Also the 
column id is displayed even though table.showkeycolumn = False

Firebug showed an error in plugin_powertable/jquery.dataTables.min.js: 
"detailed error: TypeError: a.charCodeAt is not a function"

I discovered that if I replaced /static/js/jquery.js with version v1.7.1 
from an earlier version of web2py, all the powertable problems disappeared.

Web2py 2.0.9 uses jQuery v@1.8.0 which apparently triggers the problem with 
powertable.  Earlier versions of web2py used jQuery v1.7.1 which seems to 
work ok with powertable.

I'm wondering if I can make powertable work if I use a more recent version 
of datatables?  Which files from the datatables would I have to 
incorporate? Any suggestions?

- Tom




On Monday, October 8, 2012 5:42:46 PM UTC-6, rochacbruno wrote:
>
> Thanks, I will update the repo. 

-- 





Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread Bruno Rocha
Thanks, I will update the repo.

-- 





[web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread tomt
Thanks to everybody for fixing this!

You might also want to make a similar change at about line 244:
 
   try:
field = sqlrows.db[tablename][fieldname]
#   except KeyError:
except (KeyError,AttributeError):
field = None


On Monday, October 8, 2012 2:15:58 PM UTC-6, Massimo Di Pierro wrote:


:-)
>
> On Monday, 8 October 2012 12:53:27 UTC-5, Don_X wrote:
>>
>> BINGO ! - IT WORKS LIKE A CHARM MASSIMO !!! ...  
>>
>> Thank you ... now  I can study this properly so I can adapt it to my app !
>>
>> On Monday, October 8, 2012 1:49:09 PM UTC-4, Massimo Di Pierro wrote:
>>>
>>> Now the error is at a different line. The previous error has been fixed. 
>>> Now it is at line 215:
>>>
>>>
>>> try:
>>> _id = record[keycolumntbl][keycolumnfld]
>>> except KeyError:
>>>
>>>
>>> as before it should be
>>>
>>> try:
>>> _id = record[keycolumntbl][keycolumnfld]
>>> except (KeyError, AttributeError):
>>>
>>>
>>>
>>> On Monday, 8 October 2012 12:39:09 UTC-5, Don_X wrote:

 For a more detailed report .. I have openned up the last line 
 pertaining to the plugin_powertable.py below :



- 
Function argument list   

()

Code listing



20.
21.
22.
23.
24.
25.

26.
27.
28.
29.

table.showkeycolumn = False
table.extra = dict(
   
 details={'detailscallback':URL('myfunction.load')}
   )

table = table.create()


return locals()

   Variables
 
table>>>'...te': }>table.create<
function plugin_powertable>   
-   

*File /home/www-data/web2py/applications/powertable/
models/plugin_powertable.py in plugin_powertable at line 811*
code
arguments
variables   
Function argument list


()
  Code listing 

806.
807.
808.
809.
810.
811.

812.
813.
814.
815.

ifunctions=str(ifunctions),

 searchcolumnjs=str(searchcolumnjs)
)
  ),
CSS,
PowerTable(),

)


plugins.powerTable.create = plugin_powertable

Variables
global PowerTable
- 
 

*File /home/www-data/web2py/applications/powertable/
models/plugin_powertable.py in __init__ at line 215*
code
arguments
variables   

Function argument list


(self=<__restricted__.PowerTable object>)
  Code listing



210.
211.
212.
213.
214.
215.

216.
217.
218.
219.

else:
_title = T('Record %s' % str(rc+1))

#setting the id and key for every  based on required 
 keycolumn
try:
_id = record[keycolumntbl][keycolumnfld]

except KeyError:
if virtualfields:
_id = record[sqlrows.colnames[0].split('.')[0]].id
else:


   Variables
 
 record>>>object at 0xa757f98c>, 'name': 'Television'}>_idundefined
keycolumntbl'product'keycolumnfld'id'
- 

*File /home/www-data/web2py/gluon/dal.py in __getitem__ 
at line 6376*
code
arguments
variables  
Function argument list


(self=>>>'...ter object at 0xa757f98c>, 'name': 'Television'}>, 
key='product')
Code listing  

6371.
6372.
6373.
6374.
6375.
6376.

6377.
6378.
6379.
6380.

elif m:
try:
   

[web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread Massimo Di Pierro
:-)

On Monday, 8 October 2012 12:53:27 UTC-5, Don_X wrote:
>
> BINGO ! - IT WORKS LIKE A CHARM MASSIMO !!! ...  
>
> Thank you ... now  I can study this properly so I can adapt it to my app !
>
> On Monday, October 8, 2012 1:49:09 PM UTC-4, Massimo Di Pierro wrote:
>>
>> Now the error is at a different line. The previous error has been fixed. 
>> Now it is at line 215:
>>
>>
>> try:
>> _id = record[keycolumntbl][keycolumnfld]
>> except KeyError:
>>
>>
>> as before it should be
>>
>> try:
>> _id = record[keycolumntbl][keycolumnfld]
>> except (KeyError, AttributeError):
>>
>>
>>
>> On Monday, 8 October 2012 12:39:09 UTC-5, Don_X wrote:
>>>
>>> For a more detailed report .. I have openned up the last line pertaining 
>>> to the plugin_powertable.py below :
>>>
>>>
>>>
>>>- 
>>>Function argument list   
>>>
>>>()
>>>
>>>Code listing
>>>
>>>
>>>
>>>20.
>>>21.
>>>22.
>>>23.
>>>24.
>>>25.
>>>
>>>26.
>>>27.
>>>28.
>>>29.
>>>
>>>table.showkeycolumn = False
>>>table.extra = dict(
>>>   details={'detailscallback':URL('myfunction.load')}
>>>   )
>>>
>>>table = table.create()
>>>
>>>
>>>return locals()
>>>
>>>   Variables
>>> 
>>>table>>'...te': }>table.create<
>>>function plugin_powertable>   
>>>-   
>>>
>>>*File /home/www-data/web2py/applications/powertable/
>>>models/plugin_powertable.py in plugin_powertable at line 811*
>>>code
>>>arguments
>>>variables   
>>>Function argument list
>>>
>>>
>>>()
>>>  Code listing 
>>>
>>>806.
>>>807.
>>>808.
>>>809.
>>>810.
>>>811.
>>>
>>>812.
>>>813.
>>>814.
>>>815.
>>>
>>>ifunctions=str(ifunctions),
>>>
>>> searchcolumnjs=str(searchcolumnjs)
>>>)
>>>  ),
>>>CSS,
>>>PowerTable(),
>>>
>>>)
>>>
>>>
>>>plugins.powerTable.create = plugin_powertable
>>>
>>>Variables
>>>global PowerTable
>>>- 
>>> 
>>>
>>>*File /home/www-data/web2py/applications/powertable/
>>>models/plugin_powertable.py in __init__ at line 215*
>>>code
>>>arguments
>>>variables   
>>>
>>>Function argument list
>>>
>>>
>>>(self=<__restricted__.PowerTable object>)
>>>  Code listing
>>>
>>>
>>>
>>>210.
>>>211.
>>>212.
>>>213.
>>>214.
>>>215.
>>>
>>>216.
>>>217.
>>>218.
>>>219.
>>>
>>>else:
>>>_title = T('Record %s' % str(rc+1))
>>>
>>>#setting the id and key for every  based on required 
>>> keycolumn
>>>try:
>>>_id = record[keycolumntbl][keycolumnfld]
>>>
>>>except KeyError:
>>>if virtualfields:
>>>_id = record[sqlrows.colnames[0].split('.')[0]].id
>>>else:
>>>
>>>
>>>   Variables
>>> 
>>> record>>object at 0xa757f98c>, 'name': 'Television'}>_idundefinedkeycolumntbl
>>>'product'keycolumnfld'id'
>>>- 
>>>
>>>*File /home/www-data/web2py/gluon/dal.py in __getitem__ 
>>>at line 6376*
>>>code
>>>arguments
>>>variables  
>>>Function argument list
>>>
>>>
>>>(self=>>'...ter object at 0xa757f98c>, 'name': 'Television'}>, 
>>>key='product')
>>>Code listing  
>>>
>>>6371.
>>>6372.
>>>6373.
>>>6374.
>>>6375.
>>>6376.
>>>
>>>6377.
>>>6378.
>>>6379.
>>>6380.
>>>
>>>elif m:
>>>try:
>>>return ogetattr(self, m.group(1))[m.group(2)]
>>>except (KeyError,AttributeError,TypeError):
>>>key = m.group(2)
>>>return ogetattr(self, key)
>>>
>>>
>>>def __setitem__(self, key, value):
>>>setattr(self, str(key), value)
>>>
>>> Variables
>>>   self>> '...ter 
>>>object at 0xa757f98c>, 'name': 'Television'}>global ogetattr>>wrapper '__getattribute__' of 'object' objects>key'product'
>>>
>>>
>>>
>>>

-- 





[web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread Don_X
BINGO ! - IT WORKS LIKE A CHARM MASSIMO !!! ...  

Thank you ... now  I can study this properly so I can adapt it to my app !

On Monday, October 8, 2012 1:49:09 PM UTC-4, Massimo Di Pierro wrote:
>
> Now the error is at a different line. The previous error has been fixed. 
> Now it is at line 215:
>
>
> try:
> _id = record[keycolumntbl][keycolumnfld]
> except KeyError:
>
>
> as before it should be
>
> try:
> _id = record[keycolumntbl][keycolumnfld]
> except (KeyError, AttributeError):
>
>
>
> On Monday, 8 October 2012 12:39:09 UTC-5, Don_X wrote:
>>
>> For a more detailed report .. I have openned up the last line pertaining 
>> to the plugin_powertable.py below :
>>
>>
>>
>>- 
>>Function argument list   
>>
>>()
>>
>>Code listing
>>
>>
>>
>>20.
>>21.
>>22.
>>23.
>>24.
>>25.
>>
>>26.
>>27.
>>28.
>>29.
>>
>>table.showkeycolumn = False
>>table.extra = dict(
>>   details={'detailscallback':URL('myfunction.load')}
>>   )
>>
>>table = table.create()
>>
>>
>>return locals()
>>
>>   Variables
>> 
>>table>'...te': }>table.create<
>>function plugin_powertable>   
>>-   
>>
>>*File /home/www-data/web2py/applications/powertable/models
>>/plugin_powertable.py in plugin_powertable at line 811*
>>code
>>arguments
>>variables   
>>Function argument list
>>
>>
>>()
>>  Code listing 
>>
>>806.
>>807.
>>808.
>>809.
>>810.
>>811.
>>
>>812.
>>813.
>>814.
>>815.
>>
>>ifunctions=str(ifunctions),
>>searchcolumnjs=str(searchcolumnjs)
>>)
>>  ),
>>CSS,
>>PowerTable(),
>>
>>)
>>
>>
>>plugins.powerTable.create = plugin_powertable
>>
>>Variables
>>global PowerTable
>>- 
>> 
>>
>>*File /home/www-data/web2py/applications/powertable/models
>>/plugin_powertable.py in __init__ at line 215*
>>code
>>arguments
>>variables   
>>
>>Function argument list
>>
>>
>>(self=<__restricted__.PowerTable object>)
>>  Code listing
>>
>>
>>
>>210.
>>211.
>>212.
>>213.
>>214.
>>215.
>>
>>216.
>>217.
>>218.
>>219.
>>
>>else:
>>_title = T('Record %s' % str(rc+1))
>>
>>#setting the id and key for every  based on required 
>> keycolumn
>>try:
>>_id = record[keycolumntbl][keycolumnfld]
>>
>>except KeyError:
>>if virtualfields:
>>_id = record[sqlrows.colnames[0].split('.')[0]].id
>>else:
>>
>>
>>   Variables
>> 
>> record>object at 0xa757f98c>, 'name': 'Television'}>_idundefinedkeycolumntbl'
>>product'keycolumnfld'id'
>>- 
>>
>>*File /home/www-data/web2py/gluon/dal.py in __getitem__ 
>>at line 6376*
>>code
>>arguments
>>variables  
>>Function argument list
>>
>>
>>(self=>'...ter object at 0xa757f98c>, 'name': 'Television'}>, 
>>key='product')
>>Code listing  
>>
>>6371.
>>6372.
>>6373.
>>6374.
>>6375.
>>6376.
>>
>>6377.
>>6378.
>>6379.
>>6380.
>>
>>elif m:
>>try:
>>return ogetattr(self, m.group(1))[m.group(2)]
>>except (KeyError,AttributeError,TypeError):
>>key = m.group(2)
>>return ogetattr(self, key)
>>
>>
>>def __setitem__(self, key, value):
>>setattr(self, str(key), value)
>>
>> Variables
>>   self>object at 0xa757f98c>, 'name': 'Television'}>global ogetattr>wrapper '__getattribute__' of 'object' objects>key'product'
>>
>>
>>
>>

-- 





[web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread Massimo Di Pierro
Now the error is at a different line. The previous error has been fixed. 
Now it is at line 215:


try:
_id = record[keycolumntbl][keycolumnfld]
except KeyError:


as before it should be

try:
_id = record[keycolumntbl][keycolumnfld]
except (KeyError, AttributeError):



On Monday, 8 October 2012 12:39:09 UTC-5, Don_X wrote:
>
> For a more detailed report .. I have openned up the last line pertaining 
> to the plugin_powertable.py below :
>
>
>
>- 
>Function argument list   
>
>()
>
>Code listing
>
>
>
>20.
>21.
>22.
>23.
>24.
>25.
>
>26.
>27.
>28.
>29.
>
>table.showkeycolumn = False
>table.extra = dict(
>   details={'detailscallback':URL('myfunction.load')}
>   )
>
>table = table.create()
>
>
>return locals()
>
>   Variables
> 
>table:  0xa762e144>}>table.create>   
>-   
>
>*File /home/www-data/web2py/applications/powertable/models/
>plugin_powertable.py in plugin_powertable at line 811*
>code
>arguments
>variables   
>Function argument list
>
>
>()
>  Code listing 
>
>806.
>807.
>808.
>809.
>810.
>811.
>
>812.
>813.
>814.
>815.
>
>ifunctions=str(ifunctions),
>searchcolumnjs=str(searchcolumnjs)
>)
>  ),
>CSS,
>PowerTable(),
>
>)
>
>
>plugins.powerTable.create = plugin_powertable
>
>Variables
>global PowerTable
>- 
> 
>
>*File /home/www-data/web2py/applications/powertable/models/
>plugin_powertable.py in __init__ at line 215*
>code
>arguments
>variables   
>
>Function argument list
>
>
>(self=<__restricted__.PowerTable object>)
>  Code listing
>
>
>
>210.
>211.
>212.
>213.
>214.
>215.
>
>216.
>217.
>218.
>219.
>
>else:
>_title = T('Record %s' % str(rc+1))
>
>#setting the id and key for every  based on required 
> keycolumn
>try:
>_id = record[keycolumntbl][keycolumnfld]
>
>except KeyError:
>if virtualfields:
>_id = record[sqlrows.colnames[0].split('.')[0]].id
>else:
>
>
>   Variables
> 
> recordobject at 0xa757f98c>, 'name': 'Television'}>_idundefinedkeycolumntbl'
>product'keycolumnfld'id'
>- 
>
>*File /home/www-data/web2py/gluon/dal.py in __getitem__ at 
>line 6376*
>code
>arguments
>variables  
>Function argument list
>
>
>(self='...ter object at 0xa757f98c>, 'name': 'Television'}>, 
>key='product')
>Code listing  
>
>6371.
>6372.
>6373.
>6374.
>6375.
>6376.
>
>6377.
>6378.
>6379.
>6380.
>
>elif m:
>try:
>return ogetattr(self, m.group(1))[m.group(2)]
>except (KeyError,AttributeError,TypeError):
>key = m.group(2)
>return ogetattr(self, key)
>
>
>def __setitem__(self, key, value):
>setattr(self, str(key), value)
>
> Variables
>   selfobject at 0xa757f98c>, 'name': 'Television'}>global ogetattrwrapper '__getattribute__' of 'object' objects>key'product'
>
>
>
>

-- 





Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread Don_X

Bruno .. I am using the app example from your bitbucket 

the web2py.app.skrywer_powertable.w2p  


On Monday, October 8, 2012 1:33:50 PM UTC-4, rochacbruno wrote:
>
> Hi Don,
>
> I will try to reproduce it here and maybe make some updates to plugin.
>
> Can you give me a full code sample? The basic model you are using, the 
> powerTable options etc.. (if you can put on a pastebin)
>
> Thanks
>

-- 





[web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread Don_X
For a more detailed report .. I have openned up the last line pertaining to 
the plugin_powertable.py below :



   - 
   Function argument list   
   
   ()
   
   Code listing
   
   
   
   20.
   21.
   22.
   23.
   24.
   25.
   
   26.
   27.
   28.
   29.
   
   table.showkeycolumn = False
   table.extra = dict(
  details={'detailscallback':URL('myfunction.load')}
  )
   
   table = table.create()
   
   
   return locals()
   
  Variables

   table}>table.create   
   -   
   
   *File /home/www-data/web2py/applications/powertable/models/
   plugin_powertable.py in plugin_powertable at line 811*
   code
   arguments
   variables   
   Function argument list
   
   
   ()
 Code listing 
   
   806.
   807.
   808.
   809.
   810.
   811.
   
   812.
   813.
   814.
   815.
   
   ifunctions=str(ifunctions),
   searchcolumnjs=str(searchcolumnjs)
   )
 ),
   CSS,
   PowerTable(),
   
   )
   
   
   plugins.powerTable.create = plugin_powertable
   
   Variables
   global PowerTable
   - 

   
   *File /home/www-data/web2py/applications/powertable/models/
   plugin_powertable.py in __init__ at line 215*
   code
   arguments
   variables   
   
   Function argument list
   
   
   (self=<__restricted__.PowerTable object>)
 Code listing
   
   
   
   210.
   211.
   212.
   213.
   214.
   215.
   
   216.
   217.
   218.
   219.
   
   else:
   _title = T('Record %s' % str(rc+1))
   
   #setting the id and key for every  based on required 
keycolumn
   try:
   _id = record[keycolumntbl][keycolumnfld]
   
   except KeyError:
   if virtualfields:
   _id = record[sqlrows.colnames[0].split('.')[0]].id
   else:
   
   
  Variables

record, 'name': 'Television'}>_idundefinedkeycolumntbl'
   product'keycolumnfld'id'
   - 
   
   *File /home/www-data/web2py/gluon/dal.py in __getitem__ at 
   line 6376*
   code
   arguments
   variables  
   Function argument list
   
   
   (self=, 'name': 'Television'}>, 
   key='product')
   Code listing  
   
   6371.
   6372.
   6373.
   6374.
   6375.
   6376.
   
   6377.
   6378.
   6379.
   6380.
   
   elif m:
   try:
   return ogetattr(self, m.group(1))[m.group(2)]
   except (KeyError,AttributeError,TypeError):
   key = m.group(2)
   return ogetattr(self, key)
   
   
   def __setitem__(self, key, value):
   setattr(self, str(key), value)
   
Variables
  self, 'name': 'Television'}>global ogetattrkey'product'
   


-- 





[web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread Massimo Di Pierro
It cannot be. The former traceback said:

  File 
"/home/fvillarroel/www/web2py/applications/administrador/models/plugin_powertable.py",
 
line 178, in __init__ 
headers[c] = sqlrows.db[t][f].label 

now this line does not exist any more. Please report the complete traceback.

On Monday, October 8, 2012 12:23:25 PM UTC-5, Don_X wrote:
>
>
> Same as above Massimo ... it gives the exact same traceback as above ... 
>
> and the lines that I have changed are from line no 177 to 185 as follows :
>>
>   elif headers=='labels':
> headers = {}
> for c in columns:
> (t,f) = c.split('.')
> table = sqlrows.db[t]
> if f in table.fields:
> headers[c] = table[f].label
> else:
> headers[c] = virtuallabels.get(c,capitalizefieldname(c
> ))
>
>  
>

-- 





Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread Bruno Rocha
Hi Don,

I will try to reproduce it here and maybe make some updates to plugin.

Can you give me a full code sample? The basic model you are using, the
powerTable options etc.. (if you can put on a pastebin)

Thanks

-- 





[web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread Don_X

Same as above Massimo ... it gives the exact same traceback as above ... 

and the lines that I have changed are from line no 177 to 185 as follows :
>
  elif headers=='labels':
headers = {}
for c in columns:
(t,f) = c.split('.')
table = sqlrows.db[t]
if f in table.fields:
headers[c] = table[f].label
else:
headers[c] = virtuallabels.get(c,capitalizefieldname(c))

 

-- 





[web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread Massimo Di Pierro
Can you show a complete traceback and a code snipped of powertable? I guess 
my version of powertable does not match yours or the error is now at a 
different line.

On Monday, 8 October 2012 12:07:46 UTC-5, Don_X wrote:
>
> Thank you Massimo .. but the same error persists  ... with both 
> suggestions !
>

-- 





[web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread Don_X
Thank you Massimo .. but the same error persists  ... with both suggestions 
!

-- 





[web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread Massimo Di Pierro
Or better this should be:

table = sqlrows.db[t]
if f in table.fields:
headers[c] = table[f].label
else:


On Monday, 8 October 2012 11:55:23 UTC-5, Massimo Di Pierro wrote:
>
> The error is that in plugin_powertable.py there are these lines:
>
> try:
> headers[c] = sqlrows.db[t][f].label
> except KeyError:
>
> They should be changed to
>
> try:
> headers[c] = sqlrows.db[t][f].label
> except (KeyError, AttributeError):
>
> The fact is that table[f] when f is an invalid key now raises an 
> AttributeError, not a KeyError. That is because table[f] is the same as 
> getattr(table,f). While we can change and revert this behavior, making 
> table['f'] equivalent to table.f instead of vice versa resulted in a 10x 
> improvement while extracting data from DAL.
>
>
>
> On Monday, 8 October 2012 10:44:15 UTC-5, Don_X wrote:
>>
>> it runs by  bypassing the admin/default/index page ...
>> but F.Y.I
>>
>> the powertable app example still does not run : I get the following error 
>> :
>>
>>
>>  'Row' object has no attribute 
>> 'product'
>> Versionweb2py™(2, 1, 0, datetime.datetime(2012, 10, 8, 15, 17, 50), 
>> 'dev')PythonPython 2.7.3: /usr/bin/python
>>
>>
>> Traceback
>>
>> 1.
>> 2.
>> 3.
>> 4.
>> 5.
>> 6.
>> 7.
>> 8.
>> 9.
>> 10.
>> 11.
>> 12.
>> 13.
>> 14.
>> 15.
>> 16.
>>
>> Traceback (most recent call last):
>>   File "/home/www-data/web2py/gluon/restricted.py", line 209, in restricted
>> exec ccode in environment
>>   File 
>> "/home/www-data/web2py/applications/powertable/controllers/default.py" 
>> , 
>> line 80, in 
>>   File "/home/www-data/web2py/gluon/globals.py", line 187, in 
>> self._caller = lambda f: f()
>>   File 
>> "/home/www-data/web2py/applications/powertable/controllers/default.py" 
>> , 
>> line 25, in index
>> table = table.create()
>>   File 
>> "/home/www-data/web2py/applications/powertable/models/plugin_powertable.py" 
>> ,
>>  line 810, in plugin_powertable
>> PowerTable(),
>>   File 
>> "/home/www-data/web2py/applications/powertable/models/plugin_powertable.py" 
>> ,
>>  line 214, in __init__
>> _id = record[keycolumntbl][keycolumnfld]
>>   File "/home/www-data/web2py/gluon/dal.py", line 6376, in __getitem__
>> return ogetattr(self, key)
>> AttributeError: 'Row' object has no attribute 'product'
>>
>>
>> I wish I knew how to fix this ! ... I will try though !
>>
>>

-- 





[web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread Massimo Di Pierro
The error is that in plugin_powertable.py there are these lines:

try:
headers[c] = sqlrows.db[t][f].label
except KeyError:

They should be changed to

try:
headers[c] = sqlrows.db[t][f].label
except (KeyError, AttributeError):

The fact is that table[f] when f is an invalid key now raises an 
AttributeError, not a KeyError. That is because table[f] is the same as 
getattr(table,f). While we can change and revert this behavior, making 
table['f'] equivalent to table.f instead of vice versa resulted in a 10x 
improvement while extracting data from DAL.



On Monday, 8 October 2012 10:44:15 UTC-5, Don_X wrote:
>
> it runs by  bypassing the admin/default/index page ...
> but F.Y.I
>
> the powertable app example still does not run : I get the following error :
>
>
>  'Row' object has no attribute 'product'
> Versionweb2py™(2, 1, 0, datetime.datetime(2012, 10, 8, 15, 17, 50), 'dev')
> PythonPython 2.7.3: /usr/bin/python
>
>
> Traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
> 14.
> 15.
> 16.
>
> Traceback (most recent call last):
>   File "/home/www-data/web2py/gluon/restricted.py", line 209, in restricted
> exec ccode in environment
>   File "/home/www-data/web2py/applications/powertable/controllers/default.py" 
> , 
> line 80, in 
>   File "/home/www-data/web2py/gluon/globals.py", line 187, in 
> self._caller = lambda f: f()
>   File "/home/www-data/web2py/applications/powertable/controllers/default.py" 
> , 
> line 25, in index
> table = table.create()
>   File 
> "/home/www-data/web2py/applications/powertable/models/plugin_powertable.py" 
> ,
>  line 810, in plugin_powertable
> PowerTable(),
>   File 
> "/home/www-data/web2py/applications/powertable/models/plugin_powertable.py" 
> ,
>  line 214, in __init__
> _id = record[keycolumntbl][keycolumnfld]
>   File "/home/www-data/web2py/gluon/dal.py", line 6376, in __getitem__
> return ogetattr(self, key)
> AttributeError: 'Row' object has no attribute 'product'
>
>
> I wish I knew how to fix this ! ... I will try though !
>
>

-- 





[web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread Don_X
it runs by  bypassing the admin/default/index page ...
but F.Y.I

the powertable app example still does not run : I get the following error :


 'Row' object has no attribute 'product'
Versionweb2py™(2, 1, 0, datetime.datetime(2012, 10, 8, 15, 17, 50), 'dev')
PythonPython 2.7.3: /usr/bin/python


Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.

Traceback (most recent call last):
  File "/home/www-data/web2py/gluon/restricted.py", line 209, in restricted
exec ccode in environment
  File "/home/www-data/web2py/applications/powertable/controllers/default.py" 
, line 
80, in 
  File "/home/www-data/web2py/gluon/globals.py", line 187, in 
self._caller = lambda f: f()
  File "/home/www-data/web2py/applications/powertable/controllers/default.py" 
, line 
25, in index
table = table.create()
  File 
"/home/www-data/web2py/applications/powertable/models/plugin_powertable.py" 
, 
line 810, in plugin_powertable
PowerTable(),
  File 
"/home/www-data/web2py/applications/powertable/models/plugin_powertable.py" 
, 
line 214, in __init__
_id = record[keycolumntbl][keycolumnfld]
  File "/home/www-data/web2py/gluon/dal.py", line 6376, in __getitem__
return ogetattr(self, key)
AttributeError: 'Row' object has no attribute 'product'


I wish I knew how to fix this ! ... I will try though !

-- 





[web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread Don_X
Massimo,

the latest trunk or nightly build ... they do not run for now !

-- 





[web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread Massimo Di Pierro
Please use the latest trunk or nightly built. This problem has been fixed 
yesterday.

On Monday, 8 October 2012 08:52:17 UTC-5, Don_X wrote:
>
>
> PowerGrid  works with the latests web2py 2+ . while Powertable does 
> not 
>
> I was wondering what the real differences are between these 2 powerfull 
> plugins
>
> they both seems to do basically the same things ... but PowerTable looks 
> much better  and seems to have more options ... !
>
> the app example for powertable does not work in web2py ...
>
> the one named :  web2py.app.skrywer_powertable.w2p  
>
>  I tried to test it yersterday  .. but does not work !
> I get the following error on 2.0.9
>
>  'Row' object has no attribute 'product'
> Version  
> web2py™(2, 0, 9, datetime.datetime(2012, 10, 2, 3, 55, 58), 
> 'dev')PythonPython 
> 2.7.3: /usr/bin/python
> Traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
> 14.
> 15.
> 16.
>
> Traceback (most recent call last):
>   File "/home/www-data/web2py/gluon/restricted.py", line 209, in restricted
> exec ccode in environment
>   File "/home/www-data/web2py/applications/powertable/controllers/default.py" 
> , 
> line 80, in 
>   File "/home/www-data/web2py/gluon/globals.py", line 186, in 
> self._caller = lambda f: f()
>   File "/home/www-data/web2py/applications/powertable/controllers/default.py" 
> , 
> line 25, in index
> table = table.create()
>   File 
> "/home/www-data/web2py/applications/powertable/models/plugin_powertable.py" 
> ,
>  line 810, in plugin_powertable
> PowerTable(),
>   File 
> "/home/www-data/web2py/applications/powertable/models/plugin_powertable.py" 
> ,
>  line 214, in __init__
> _id = record[keycolumntbl][keycolumnfld]
>   File "/home/www-data/web2py/gluon/dal.py", line 6369, in __getitem__
> return ogetattr(self, key)
> AttributeError: 'Row' object has no attribute 'product'
>
>
> I was planning on  using the powertable for my soccer app ... it seems 
> I'll have to do it with powergrid instead ...
>
> Any news on powertable ??? ... 
>
> Bruno ... if I was half as good as you .. I would of helped you maintain 
> this beauty ! .. i watched your vimeo cast  about it ... it is simply 
> powerfull ...and would be very usefull to me !
>
> Don
>

-- 





[web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-08 Thread Don_X

PowerGrid  works with the latests web2py 2+ . while Powertable does not 

I was wondering what the real differences are between these 2 powerfull 
plugins

they both seems to do basically the same things ... but PowerTable looks 
much better  and seems to have more options ... !

the app example for powertable does not work in web2py ...

the one named :  web2py.app.skrywer_powertable.w2p  

 I tried to test it yersterday  .. but does not work !
I get the following error on 2.0.9

 'Row' object has no attribute 'product'
Version  
web2py™(2, 0, 9, datetime.datetime(2012, 10, 2, 3, 55, 58), 'dev')PythonPython 
2.7.3: /usr/bin/python
Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.

Traceback (most recent call last):
  File "/home/www-data/web2py/gluon/restricted.py", line 209, in restricted
exec ccode in environment
  File "/home/www-data/web2py/applications/powertable/controllers/default.py" 
, line 
80, in 
  File "/home/www-data/web2py/gluon/globals.py", line 186, in 
self._caller = lambda f: f()
  File "/home/www-data/web2py/applications/powertable/controllers/default.py" 
, line 
25, in index
table = table.create()
  File 
"/home/www-data/web2py/applications/powertable/models/plugin_powertable.py" 
, 
line 810, in plugin_powertable
PowerTable(),
  File 
"/home/www-data/web2py/applications/powertable/models/plugin_powertable.py" 
, 
line 214, in __init__
_id = record[keycolumntbl][keycolumnfld]
  File "/home/www-data/web2py/gluon/dal.py", line 6369, in __getitem__
return ogetattr(self, key)
AttributeError: 'Row' object has no attribute 'product'


I was planning on  using the powertable for my soccer app ... it seems I'll 
have to do it with powergrid instead ...

Any news on powertable ??? ... 

Bruno ... if I was half as good as you .. I would of helped you maintain 
this beauty ! .. i watched your vimeo cast  about it ... it is simply 
powerfull ...and would be very usefull to me !

Don

-- 





Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-03 Thread FERNANDO VILLARROEL
Dear Bruno
Any update about powerTable + Web2py 2.0.9

--- On Mon, 10/1/12, Bruno Rocha  wrote:

From: Bruno Rocha 
Subject: Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no 
attribute 'virtual'
To: web2py@googlegroups.com
Date: Monday, October 1, 2012, 1:04 AM

Are you running new version of web2py? I guess the old style virtual fields is 
not working and also I have to check if the injection of virtualsettings will 
still work with web2py 2.0+
I will take a closer look on powertable code tomorrow to see if I can adapt it 
to work with the new web2py.



-- 

 

 

 

-- 





Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-02 Thread tomt
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 * wrote:
>>>>
>>>>
>>>> From: Massimo Di Pierro 
>>>> Subject: [web2py] Re: powerTable AttributeError: 'DAL' object has no 
>>>> attribute 'virtual'
>>>> To: web...@googlegroups.com
>>>> 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  
>>>>   File "/home/fvillarroel/www/web2py/ gluon/globals.py", line 185, in 
>>>>  
>>>> 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. 
>>>>
>>>>
>>>>  -- 
>>>>  
>>>>  
>>>>  
>>>>
>>>>

-- 





Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-01 Thread Massimo Di Pierro
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 * wrote:
>>>
>>>
>>> From: Massimo Di Pierro 
>>> Subject: [web2py] Re: powerTable AttributeError: 'DAL' object has no 
>>> attribute 'virtual'
>>> To: web...@googlegroups.com
>>> 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  
>>>   File "/home/fvillarroel/www/web2py/ gluon/globals.py", line 185, in 
>>>  
>>> 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. 
>>>
>>>
>>>  -- 
>>>  
>>>  
>>>  
>>>
>>>

-- 





Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-01 Thread Wes Hall
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 * wrote:
>>
>>
>> From: Massimo Di Pierro 
>> Subject: [web2py] Re: powerTable AttributeError: 'DAL' object has no 
>> attribute 'virtual'
>> To: web...@googlegroups.com
>> 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  
>>   File "/home/fvillarroel/www/web2py/ gluon/globals.py", line 185, in 
>>  
>> 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. 
>>
>>
>>  -- 
>>  
>>  
>>  
>>
>>

-- 





Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-01 Thread Massimo Di Pierro
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 
> >* wrote:
>
>
> From: Massimo Di Pierro >
> Subject: [web2py] Re: powerTable AttributeError: 'DAL' object has no 
> attribute 'virtual'
> To: web...@googlegroups.com 
> 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  
>   File "/home/fvillarroel/www/web2py/ gluon/globals.py", line 185, in 
>  
> 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. 
>
>
>  -- 
>  
>  
>  
>
>

-- 





Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-01 Thread FERNANDO VILLARROEL
Dear Bruno.
Yes effectively i am using the new version of web2py 2.0.8

--- On Mon, 10/1/12, Bruno Rocha  wrote:

From: Bruno Rocha 
Subject: Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no 
attribute 'virtual'
To: web2py@googlegroups.com
Date: Monday, October 1, 2012, 1:04 AM

Are you running new version of web2py? I guess the old style virtual fields is 
not working and also I have to check if the injection of virtualsettings will 
still work with web2py 2.0+
I will take a closer look on powertable code tomorrow to see if I can adapt it 
to work with the new web2py.



-- 

 

 

 

-- 





Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-09-30 Thread Bruno Rocha
Are you running new version of web2py? I guess the old style virtual fields
is not working and also I have to check if the injection of virtualsettings
will still work with web2py 2.0+

I will take a closer look on powertable code tomorrow to see if I can adapt
it to work with the new web2py.

-- 





Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-09-30 Thread FERNANDO VILLARROEL
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  wrote:

From: Massimo Di Pierro 
Subject: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 
'virtual'
To: web2py@googlegroups.com
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 

  File "/home/fvillarroel/www/web2py/ gluon/globals.py", line 185, in 

    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.









-- 

 

 

 

-- 





[web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-09-30 Thread Massimo Di Pierro
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  
>   File "/home/fvillarroel/www/web2py/gluon/globals.py", line 185, in 
>  
> 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. 
>
>
>

--