Error in smartgrid after updating to Version 2.5.1-stable+timestamp.2013.06.11.08.00.05

46 views
Skip to first unread message

Jim S

unread,
Jun 12, 2013, 3:56:45 PM6/12/13
to web...@googlegroups.com
My smartgrids are all failing when I have fields from multiple tables specified in the 'fields' argument.

Here is a sample traceback:

Traceback (most recent call last):
 
File "C:\dev\web2py\gluon\restricted.py", line 212, in restricted
 
exec ccode in environment
 
File "C:/dev/web2py/applications/infocenter/controllers/administration.py", line 2360, in <module>
 
File "C:\dev\web2py\gluon\globals.py", line 194, in <lambda>
 
self._caller = lambda f: f()
 
File "C:\dev\web2py\gluon\tools.py", line 3022, in f
 
return action(*a, **b)
 
File "C:/dev/web2py/applications/infocenter/controllers/administration.py", line 702, in permissions
 paginate
=15, maxtextlength=45)
 
File "C:\dev\web2py\gluon\sqlhtml.py", line 2679, in smartgrid
 user_signature
=user_signature, **kwargs)
 
File "C:\dev\web2py\gluon\sqlhtml.py", line 2377, in grid
 value
= row[str(field)]
 
File "C:\dev\web2py\gluon\dal.py", line 6865, in __getitem__
 
return ogetattr(self, key)
AttributeError: 'Row' object has no attribute 'description'


Description is a field on a referenced table that is included in the fields argument.  Worked until upgrade to 2.5.1.

-Jim

Niphlod

unread,
Jun 12, 2013, 4:41:11 PM6/12/13
to web...@googlegroups.com
yet another case to add tests to web2py :( .
Please post a sample app to reproduce the issue.

Jim Steil

unread,
Jun 12, 2013, 5:28:29 PM6/12/13
to web...@googlegroups.com
I've attached a w2p file with a new app I just created that displays the behavior.  Another thing I noticed is that if the two tables have a field with the same name, the values it brings back are always those of the primary table.


--
 
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/u7zZuhrwITA/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

web2py.app.smartgrid.w2p

dev.ld...@gmail.com

unread,
Jun 13, 2013, 12:01:55 PM6/13/13
to web...@googlegroups.com
I too am seeing this issue with the 2.5.1 release.  I believe it has to do with the changes which added VirtualFields. Since I don't know how they work I'm not sure on how to fix the issue myself without breaking VirtualFields support..

Dan

Massimo Di Pierro

unread,
Jun 13, 2013, 4:26:21 PM6/13/13
to web...@googlegroups.com
Please open a ticket about this.

Jim Steil

unread,
Jun 13, 2013, 4:32:10 PM6/13/13
to web...@googlegroups.com
Ticket 1527.


--
 
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
Reply all
Reply to author
Forward
0 new messages