Hello, I tried a clean install of web2py.app.PowerGrid.w2p and it didn't fix any problems.
I upgraded my python from 2.5.2 to 2.7.2, and web2py no longer throws an error on line 446 in modules/plugin_PowerGrid/PowerGrid.py" > with open(path ,"r") as f: Web2py still complains about 'by' in db.py db.define_table('comments',Field('by'),Field('comment','text')) 'by' is listed as a reserved word in mysql and sqlite, so I assume that's the problem. Anyways, with these changes everything is working fine now. Thanks - Tom On Jul 23, 10:02 pm, tomt <tom_tren...@yahoo.com> wrote: > Bruno, > > Thanks for the feedback. I was digging around and found that if I > changed: > <db.define_table('comments',Field('by'),Field('comment','text')) > - to > > >db.define_table('comments',Field('byuser'),Field('comment','text')) > > That error went away. My version of web2py (Version 1.97.1) seems to > be treating 'by' as a reserved word. > > After I changed this, the database tables where created successfully. > > My next step was to call up the default controller and web2py > generated an error and complained about the syntax in the following: > > File "applications/pgrid2/modules/plugin_PowerGrid/PowerGrid.py", line > 446 > with open(path ,"r") as f: > > As a test, I simply deleted this line and the following 'pass' and > powergrid started working. I'm not suggesting that this is a > resolution to my problem, but I just thought that I'd let you know. I > have already tried commenting out the auth.requires_membership line > and a fresh new app with no success, but I'll try it out again with a > clean install and let you know how it worked. > > Thanks again for the feedback, - Tom > > On Jul 23, 9:38 pm, Bruno Rocha <rochacbr...@gmail.com> wrote: > > > On Sat, Jul 23, 2011 at 2:34 AM, tomt <tom_tren...@yahoo.com> wrote: > > > DatabaseError: malformed database schema (comments) - near "by": > > > Hi Tom, I just tested it and works normally with latest web2py from download > > link, I am using Ubuntu 11.04 and Python 2.7. > > > It seens to be a problem in auth.requires_membership, try to removeor > > comment this line from default.py and see if it works. > > > Another thing is trying to run the plugin in a fresh new app, just follow > > the template code used in the example app. > > > I am writing the documentation to be online by the end of this week. > > > Thanks.. > >