that's because you're using the most unrecommended way to refer to an
aggregate (relying on a fixed representation...).
Did you try
count = db.pagos.count()
totalPagos =
SQLTABLE(db((db.pagos.created_on>inicio)&(db.pagos.created_on<fin)).\
select(count), headers={count:'Total Pagos'})
?
On Friday, March 7, 2014 9:00:40 PM UTC+1, drayco wrote:
>
> All code work with web2py 2.8.3 but when we upgrade to web2py 2.9.4, we
> use extensive SQLTABLE and in this moment we have a lot of errors similar to
>
> File "/home/drayco/webapps/newconfig/web2py/gluon/sqlhtml.py", line 2929, in
> __init__
> columns =
> ['.'.join(sqlrows.db._adapter.REGEX_TABLE_DOT_FIELD.match(c).groups()) for c
> in sqlrows.colnames]
> AttributeError: 'NoneType' object has no attribute 'groups'
>
>
> This is our code
>
> totalPagos =
> SQLTABLE(db((db.pagos.created_on>inicio)&(db.pagos.created_on<fin)).\
> select(db.pagos.id.count()), headers={'COUNT(
> pagos.id)':'Total Pagos'})
>
> What can we do?
>
> Can you help me please?
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.