[web2py] Re: SQLTABLE problem with 2.15.4

2017-11-19 Thread DaneW
I have now upgraded to 2.16.1 and everything is working including COUNT which now needs to be in uppercase. Many thanks for all your work on Web2py Leonel! On Thursday, 9 November 2017 12:41:49 UTC, Leonel Câmara wrote: > > I actually think that is also a bug because it is an inconsistency. For

[web2py] Re: SQLTABLE problem with 2.15.4

2017-11-09 Thread Leonel Câmara
I actually think that is also a bug because it is an inconsistency. For some reason in https://github.com/web2py/pydal/blob/master/pydal/dialects/base.py the DAL is using caps for everything but not for count. I'll submit a pull request for that too. web2py pull request fixing the tablename pr

[web2py] Re: SQLTABLE problem with 2.15.4

2017-11-09 Thread DaneW
Thank you - I've now added entity_quoting=False to the right place in the db=DAL statement and magically all the SQLTABLEs are now working! There is one strange behaviour - any references to the SUM statement must have the word 'SUM' in uppercase but references to 'COUNT' must all be in lower c

[web2py] Re: SQLTABLE problem with 2.15.4

2017-11-08 Thread Leonel Câmara
The entity_quoting should be in your db.py where you have db = DAL(..., entity_quoting=False) Anyway, I'll take a look at your test app since the "SUM('dpspend'.'amount')" should have worked. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/

[web2py] Re: SQLTABLE problem with 2.15.4

2017-11-08 Thread DaneW
Leonel - that seems like a good suggestion but I'm afraid it didn't work. Changing the 'SUM(dpspend.amount)' to "SUM('dpspend'.'amount')" had no effect and when I tried rows=db(query).select(.,entity_quoting=False) I got an exception - TypeError: _select_wcols() got an unexpected keyword a

[web2py] Re: SQLTABLE problem with 2.15.4

2017-11-08 Thread Leonel Câmara
DaneW I think the problem is being caused by the new DAL entity quoting so your problem is fixed if you set entity_quoting=False in your DAL call or change your headers dictionary to have quotes for instance instead of 'SUM(dpspend.amount)' you will use "SUM('dpspend'.'amount')" -- Resources:

[web2py] Re: SQLTABLE problem with 2.15.4

2017-11-08 Thread Leonel Câmara
Yes please provide me a test app I'll make it work. -- 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 t

[web2py] Re: SQLTABLE problem with 2.15.4

2017-11-08 Thread DaneW
Leonel and Donatus - thank you for your responses. Yes Leonel your suggested change works! The one thing that is not working is that the headers for the Sum and Count columns display as "count('dpspend'.'amount')" and "SUM('dpspend'.'amount')" rather than the values that I specified in the hea

[web2py] Re: SQLTABLE problem with 2.15.4

2017-11-08 Thread Leonel Câmara
Can you test something for me: in your web2py folder in file gluon/sqlhtml.py in SQLTABLE can you replace tablemap = dict(((f.tablename, f.table) for f in fieldmap.values())) with: tablemap = dict(((f.tablename, f.table) if isinstance(f, Field) else (f. _table._tablename, f._table) for f in f

[web2py] Re: SQLTABLE problem with 2.15.4

2017-11-08 Thread Donatas Burba
The ticket is opened on this bug already without any attention, https://github.com/web2py/web2py/issues/1735 2017 m. lapkritis 7 d., antradienis 15:34:07 UTC+2, DaneW rašė: > > I have upgraded from 2.14.6 to 2.15.4 (in PythonAnywhere using Python 2.7 > and MySQL) and I now get AttributeError*: *