It works. The problem seems to be that tilde is not a tilde in my original query. I don't know how to get a tilde from my italian notebook keyboard, so I copied from the PDF manual and paste it in my code. I found out that if I open a Python shell, digit chr(126) and copy the tilde character from there, then everything works fine
Marco On 23 Mar, 22:52, Yarko Tymciurak <yark...@gmail.com> wrote: > Hello Marco - > > Try this and tell us what you get: > > $ python web2py.py -S crm -M > > >>> result=db().select( db.allineamento_erp.data_allineamento, \ > > orderby=˜db.allineamento_erp.data_allineamento) > > >>> str(result) > > On Mon, Mar 23, 2009 at 4:29 PM, Marco Prosperi > <marcoprosperi...@gmail.com>wrote: > > > > > thanks for the time you spent on my question but I don't have any > > linebreak in my code after 'select'. It appears in my post after > > copying the error message from web2py and pasting it to googlegroups. > > If I cancel the character ˜ everything works fine in my application > > > Marco > > > On 23 Mar, 19:14, Hilbert Markus <hilbert.mar...@gmail.com> wrote: > > > hi, > > > > this looks like a scripting error to me. > > > i'm not a web2py-developer right now, but have some knowledge on > > > python... > > > > the linebreak after select makes the mess: > > > for i,r in enumerate(db().select(db.allineamento_erp.data_allineamento, > > > orderby=˜db.allineamento_erp.data_allineamento)): > > > whatever stuff you want to do with i and r > > > > the way you wrote it a variable called 'select' on db() is expected > > > not the method db().select() > > > > regards > > > iham > > > > On Mar 23, 2009, at 3:18 PM, Marco Prosperi wrote: > > > > > hi all, I would like to make a query to fetch records in reverse > > > > order. The manual says to use ˜ by I get this error (everything works > > > > if a eliminate ˜). On web2py (maybe not after pasting the message in > > > > googlegroups) the arrow indicating the problems point to ˜. Am I > > > > missing something or is a problem with my Italian settings? thanks, > > > > Marco > > > > > Error ticket for "X" > > > > Ticket 127.0.0.1.2009-03-23.15-02-46.51e8621c- > > > > fb62-423d-81a8-27058eccb348 > > > > > Error traceback > > > > > Traceback (most recent call last): > > > > File "gluon/restricted.py", line 97, in restricted > > > > File "C:/web2py_win159/web2py/applications/crm/controllers/ > > > > default.py", line 66 > > > > for i,r in enumerate(db().select > > > > (db > > > > .allineamento_erp > > > > .data_allineamento,orderby=˜db.allineamento_erp.data_allineamento)): > > > > > ^ > > > > SyntaxError: invalid syntax > > > > > In file: C:\web2py_win159\web2py\applications\crm/controllers/ > > > > default.py > > > > > #!/usr/bin/python > > > > # -*- coding: utf-8 -*- > > > > > response.title = "New X" > > > > response.application = "X" > > > > > if auth.user: response.menu=[ > > > > ['-Logout-',False,URL(r=request,f='user',args=['logout'])], > > > > ['Contatti',False,URL(r=request,f='select',args=['db'],vars=dict > > > > (query='db.contatti.id>0'))], > > > > ['Operatori',False,URL(r=request,f='select',args=['db'],vars=dict > > > > (query='db.operatori.id>0'))], > > > > ['Tipi attività',False,URL(r=request,f='select',args= > > > > ['db'],vars=dict(query='db.tipiattivita.id>0')) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---